next.js/packages/next/src/server/api-utils/web.ts
web.ts6 lines219 B
// Buffer.byteLength polyfill in the Edge runtime, with only utf8 strings
// supported at the moment.
export function byteLength(payload: string): number {
  return new TextEncoder().encode(payload).buffer.byteLength
}
Quest for Codev2.0.0
/
SIGN IN