Options
All
  • Public
  • Public/Protected
  • All
Menu

@waiting/base64

Index

Type aliases

BrowserTextDecoderType

BrowserTextDecoderType: object

Type declaration

BrowserTextEncoderType

BrowserTextEncoderType: object

Type declaration

NodeTextDecoderType

NodeTextDecoderType: TextDecoder

NodeTextEncoderType

NodeTextEncoderType: TextEncoder

TextDecoderFn

TextEncoderFn

Functions

b64byteLength

  • b64byteLength(base64: string): number
  • Calculate buffer.byteLength from base64

    base64 is 4/3 + up to two characters of the original data

    Parameters

    • base64: string

    Returns number

b64decode

  • b64decode(base64: string, outputEncoding?: string, textDecoder?: TextDecoderFn): string
  • Decode base64 to string

    Parameters

    • base64: string
    • Default value outputEncoding: string = "utf-8"
    • Optional textDecoder: TextDecoderFn

    Returns string

b64encode

  • b64encode(input: string | number | bigint, textEncoder?: TextEncoderFn): string
  • Encode to base64, source from string | number | bigint

    Parameters

    • input: string | number | bigint
    • Optional textEncoder: TextEncoderFn

    Returns string

b64fromBuffer

  • b64fromBuffer(buffer: ArrayBuffer | Uint8Array): string
  • Encode to base64, source from ArrayBuffer or Uint8Array

    Parameters

    • buffer: ArrayBuffer | Uint8Array

    Returns string

b64urlDecode

  • b64urlDecode(input: string, outputEncoding?: string, textDecoder?: TextDecoderFn): string

b64urlEncode

  • b64urlEncode(input: string, textEncoder?: TextEncoderFn): string

b64urlFromBuffer

  • b64urlFromBuffer(buffer: ArrayBuffer | Uint8Array): string

Generated using TypeDoc