Nauseating Packaged Meat
Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

encdec

0.1.3 • Public • Published

encdec

encdec is a node module that helps you baseXX encode and decode.

It defaults to using base58 encoding, but can easily be adapted for base16, base32, base64 - or any other base - by passing the alphabet you want to use to the create() method.

Usage

var base58 = require('encdec').create() // defaults to base58
base58.encode(1000);
base58.decode('if');

// base32 encoding
var base32 = require('encdec').create('ABCDEFGHIJKLMNOPQRSTUVWXYZ234567');
base32.encode(1000000);
base32.decode('6QSA');

nodeunit

nodenunit is used for unit testing, and is included in this repo as a submodule to the node_modules folder. To download nodeunit after cloning this repository, enter the following at your command prompt:

git submodule init
git submodule update

To run the tests, you'll need to install nodeunit if you haven't done so already.

Keywords

none

install

npm i encdec

Downloadsweekly downloads

12

version

0.1.3

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability