npm.io
1.0.5 • Published 5 years ago

base-coding

Licence
MIT
Version
1.0.5
Deps
2
Size
45 kB
Vulns
0
Weekly
0

CI

An implementation of Base16, Base32 and Base64

This is an implementation of Base16, Base32 and Base64 specified in RFC 3548.

Installation

To install this package, simply run the following command:

npm install base-coding

Hint: This package already provides type-definitions.

Usage

This package exports three namespaces: Base16, Base32 and Base64:

export namespace Base64 {
  export function encode(toEncode: string): string;
  export function decode(toDecode: string): string;
}

export namespace Base32 {
  export function encode(toEncode: string): string;
  export function decode(toDecode: string): string;
}

export namespace Base16 {
  export function encode(toEncode: string): string;
  export function decode(toDecode: string): string;
}

License

MIT License