Wondering what’s next for npm?Check out our public roadmap! »

    bs52

    1.0.0 • Public • Published

    bs52

    NPM Package Build Status

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

    bs52 is a rewrite of cryptocoinjs/base-x without Buffer and limited to base52 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 = `abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`;
    

    Example

    var bs52 = require('bs52');
    
    var decoded = bs52.encode('Bonjour ici les bidibules')
    // sTSzrBprGARdjdZHPiCpfcASBQxaCTEnHmZ
    
    console.log(bs52.decode('sTSzrBprGARdjdZHPiCpfcASBQxaCTEnHmZ'))
    // Bonjour ici ...

    Install

    npm i bs52

    DownloadsWeekly Downloads

    3

    Version

    1.0.0

    License

    none

    Unpacked Size

    14.9 kB

    Total Files

    14

    Last publish

    Collaborators

    • avatar