2.0.0-prerelease.1@next
Pre-release
Pre-release
·
219 commits
to master
since this release
2.0.0-prerelease.1 (2019-08-15)
BREAKING CHANGES
- when used from Node (without ESM enabled), you now need to
require('hashids/cjs')
- constructor: we now expect salt and alphabet to be valid strings and minLength to be a valid number (if any are provided)
- Hashids now throws errors when being constructed with incorrect options (previously, it silently fallbacked to defaults)
Bug Fixes
- extract BigInt test cases so they don't throw in unsupported envs (20f3df1)
Code Refactoring
- constructor: simplify constructor & extract 'shuffle' (85c7f49)
Features
- transparent support of
BigInts. If your environment supports them,
you can use the standard API to encode and decode them.
Note that trying to decode aBigInthashid on an unsupported environment will throw an error. Fixes #58. (df2c831) - lifted the limitation that the alphabet cannot contain spaces (df2c831)
- both the alphabet and salt may now contain multi-byte characters (e.g. for an emoji-based alphabet) (526b6ca)
- it is now possible to provide custom
seps(e.g. to avoid custom curses). Fixes #17.
Chores
- upgraded all dependencies
- tests now use
jesttesting framework - extracted static methods to helper functions
- converted the implementation to TypeScript
- added
prettier - added stricter
eslintrules - added
semantic-releasefor automated releases