@vandeurenglenn/base-x
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

base-x

module compatible base-x

install

npm i -S @vandeurenglenn/base-x

usage

const base = require('@vandeurenglenn/base-x')
// or
import base from '@vandeurenglenn/base-x'

const base32 = base('abcdefghijklmnopqrstuvwxyz234567') // base32 Alphabet

// encode
const uint8Array = new TextEncoder().encode('hi');
const bs32 = base32.encode(uint8Array)
console.log(bs32); // '2dj'

// decode
const hi = base32.decode(bs32)
const string = new TextDecoder().decode(hi);
console.log(string) // 'hi'

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.32latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.32
1.1.20
1.1.10
1.1.00
1.0.01

Package Sidebar

Install

npm i @vandeurenglenn/base-x

Weekly Downloads

3

Version

1.1.3

License

MIT

Unpacked Size

11.9 kB

Total Files

8

Last publish

Collaborators

  • vandeurenglenn