UNPKG

allbases

Version:

Transform values of abritrary size to an arbritrary base

28 lines (22 loc) 760 B
#allbases Changelog ##0.0.1 ------- - First implementation of encode and random for arbitrary bases specified by string of characters. - Helper functions for encode and random of Hex and Base62 classes - random in addition to specifying the character class base allows option flags to enable strict size checking and custom random number generator. ##0.2.0 ------- - added decode functions for all encode types ##0.3.0 ------- - Must expose allbases bignum lib to avoid type issues. - Missing decodeBase62 function. ##0.3.1 ------- - Improved decoding algorithm, got rid of wasteful bignum.pow ##0.4.0 ------- - Switched to BigNumber.js - added base64 encoding/decoding - cleaned up testing, using tape - added browser based tests with zuul & sauce labs