short, obfuscated, reversible integer-to-string encoding. uses modular arithmetic with a prime/inverse pair to scatter sequential IDs across the output space, then base-N encodes with a configurable alphabet.
src/index.js - single file, default export
tests/ - vitest
make test # run tests
make types # generate .d.ts from JSDoc
- max encodable value: 2,147,483,647 (MAX_INT32)
- uses
longnpm package for 64-bit intermediate arithmetic - alphabet is module-level state (not per-instance)
- changing alphabet changes all encodings - decode must use same alphabet as encode