fasiha / mudderjs

Lexicographically-subdivide the “space” between strings, by defining an alternate non-base-ten number system using a pre-defined dictionary of symbol↔︎number mappings. Handy for ordering NoSQL keys.
The Unlicense
122 stars 9 forks source link

numStrings=0 returns non-empty array #16

Closed fasiha closed 3 years ago

fasiha commented 3 years ago
var m=require('mudder');
m.base62.mudder('p', '', 0) // [ 'u' ] 😭

Because I, ignoramus, used a foolish default: numStrings = numStrings || 1;