bs62

1.0.0 • Public • Published

bs62

NPM Package Build Status

Fast base62 strings encoding / decoding using bitcoin style leading zero compression.

bs62 is a rewrite of cryptocoinjs/base-x without Buffer and limited to base62 and strings as input.

Target was to use the library in browsers.

@redpelicans we are using this lib to encode/decode keys using extended chars.

It's limited to below alphabet:

  const ALPHABET = `0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`;

Example

var bs62 = require('bs62');
 
var decoded = bs62.encode('Bonjour ici les bidibules')
// 2XuGb0zE9QdU3OVBUGW1EAUlh2m8TJUioH
 
console.log(bs72.decode('2XuGb0zE9QdU3OVBUGW1EAUlh2m8TJUioH'))
// Bonjour ici ...

/bs62/

    Package Sidebar

    Install

    npm i bs62

    Weekly Downloads

    2

    Version

    1.0.0

    License

    none

    Unpacked Size

    14.9 kB

    Total Files

    14

    Last publish

    Collaborators

    • ebasley