0.9.9 • Published 8 years ago

base-62.js v0.9.9

Weekly downloads
164
License
MIT
Repository
github
Last release
8 years ago

base-62.js

Circle CI npm version

#Getting started

###Install it

$ npm install base-62.js

###Require it

var base62 = require('base-62.js');

###Use it to convert a number to a base 62 string

base62.encode('144928238032487217698238462873470924850921348902347582734698872031234');
//=> "17BHYOc7KWVceLGi6QvVTM1OELAxTLd1EwAtmQW"

###Use it to come back

base62.decode('17BHYOc7KWVceLGi6QvVTM1OELAxTLd1EwAtmQW');
//=> "144928238032487217698238462873470924850921348902347582734698872031234"

###Create a portable token from a MongoDB Object id (or any HEX string)

base62.encodeHex('556c9e573337620003000000');
//=> "ynKPk8OoB7EzcAus"

base62.decodeHex('ynKPk8OoB7EzcAus')
//=> "556c9e573337620003000000"

###Create a random token (API Access or a random password)

base62.random()
//=> "jplADVZ4H8gYGRXGSbki8zBZsv5"
0.9.9

8 years ago

0.9.8

8 years ago

0.9.7

8 years ago

0.9.6

9 years ago

0.9.5

9 years ago

0.9.4

9 years ago

0.9.3

9 years ago

0.9.2

9 years ago

0.9.1

9 years ago

0.9.0

9 years ago