Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CoderTools

Hierarchy

  • CoderTools

Index

Constructors

Properties

BASE_ALPHABETS: { BASE16: string; BASE36: string; BASE58: string; BASE62: string; BASE66: string } = ...

Type declaration

  • BASE16: string
  • BASE36: string
  • BASE58: string
  • BASE62: string
  • BASE66: string

Methods

  • base16Decode(what: string, asBuffer?: boolean, asAscii?: boolean): string | Buffer
  • base16Encode(what: string | Buffer, asAscii?: boolean): string
  • base32Decode(what: string, asBuffer?: boolean, asAscii?: boolean): string | Buffer | Uint8Array
  • Parameters

    • what: string
    • asBuffer: boolean = false
    • asAscii: boolean = false

    Returns string | Buffer | Uint8Array

  • base32Encode(what: string | Buffer, asAscii?: boolean): string
  • base36Decode(what: string, asBuffer?: boolean, asAscii?: boolean): string | Buffer
  • base36Encode(what: string | Buffer, asAscii?: boolean): string
  • base58Decode(what: string, asBuffer?: boolean, asAscii?: boolean): string | Buffer | Uint8Array
  • Parameters

    • what: string
    • asBuffer: boolean = false
    • asAscii: boolean = false

    Returns string | Buffer | Uint8Array

  • base58Encode(what: string | Buffer, asAscii?: boolean): string
  • base62Decode(what: string, asBuffer?: boolean, asAscii?: boolean): string | Buffer
  • base62Encode(what: string | Buffer, asAscii?: boolean): string
  • base64Decode(what: string, asBuffer?: boolean, asAscii?: boolean): string | Buffer | Uint8Array
  • Parameters

    • what: string
    • asBuffer: boolean = false
    • asAscii: boolean = false

    Returns string | Buffer | Uint8Array

  • base64Encode(what: string | Buffer, asAscii?: boolean): string
  • base66Decode(what: string, asBuffer?: boolean, asAscii?: boolean): string | Buffer
  • base66Encode(what: string | Buffer, asAscii?: boolean): string
  • baseXDecode(what: string, base: string, asBuffer?: boolean, asAscii?: boolean): string | Buffer
  • Parameters

    • what: string
    • base: string
    • asBuffer: boolean = false
    • asAscii: boolean = false

    Returns string | Buffer

  • baseXEncode(what: string | Buffer, base: string, asAscii?: boolean): string
  • binFlagsToBuf(arr: boolean[]): Buffer
  • bufToBinFlags(buf: number | Buffer, offset?: number): Boolean[]
  • bufToDouble(buf: Buffer, offset?: number, be?: boolean): number
  • bufToFloat(buf: Buffer, offset?: number, be?: boolean): number
  • bufToInt(buf: Buffer, len?: number, offset?: number, be?: boolean): number
  • bufToInt16(buf: Buffer, offset?: number, be?: boolean): number
  • bufToInt16U(buf: Buffer, offset?: number, be?: boolean): number
  • bufToInt32(buf: Buffer, offset?: number, be?: boolean): number
  • bufToInt32U(buf: Buffer, offset?: number, be?: boolean): number
  • bufToInt8(buf: Buffer, offset?: number): number
  • bufToInt8U(buf: Buffer, offset?: number): number
  • crc32(data: string | Buffer | Uint8Array, previous?: number): number
  • doubleToBuf(int: number, be?: boolean): Buffer
  • floatToBuf(int: number, be?: boolean): Buffer
  • hexToBinStr(val: string): string
  • int16ToBuf(int: number, be?: boolean): Buffer
  • int16UToBuf(int: number, be?: boolean): Buffer
  • int32ToBuf(int: number, be?: boolean): Buffer
  • int32UToBuf(int: number, be?: boolean): Buffer
  • int53toTwoInt32(val: number): [number, number]
  • int8ToBuf(int: number): Buffer
  • int8UToBuf(int: number): Buffer
  • intToBuf(int: number, len?: number, be?: boolean): Buffer
  • isBuffer(what: any): boolean
  • makeWBuffer(cb: (arg: Buffer) => void, length: number): Buffer
  • Parameters

    • cb: (arg: Buffer) => void
        • (arg: Buffer): void
        • Parameters

          • arg: Buffer

          Returns void

    • length: number

    Returns Buffer

  • pad(str: string | number, z?: number): string
  • toBuffer(what: string | Buffer, ascii?: boolean): Buffer
  • twoInt32toInt53(val: [number, number]): number

Generated using TypeDoc