- Bump development dependencies
- Unsupported JS constructs for legacy node versions
- Upgrade development dependencies
- Refactor add minor missing function return types
- Refactor style lint rule to use standard 2 indent width
- More robust type system with support for advanced options validation
- Separate function signatures and JSDocs for different token return types
- Dedicated test ensuring modulo-bias is avoided
- New
randomDigits
alias followingnode/crypto
naming convention - Refactor whole package to dedicated, loosely coupled modules
- Further static tests to ensure type compatibility and safety
- Upgrade development dependencies
- Minor fixes and improvements
- Exported function signatures to add support for conditional, more advanced type checking and documentation
- Updated default examples in docs to TypeScript
- Default return type not being recognised as string
- Bump development dependencies
- Bump development dependencies
- Refactor main & validator modules
- Clarified documentation for custom options
- Minor fixes and improvements
- Update package lock format
- Upgrade npm lockfile version
- Bump various dev-dependencies
- Minor fixes and improvements
- CI workflow for automatic GitHub release generation
- Updated some
dev-dependencies
to their newer versions as per #5
- Minor documentation improvements regarding customisation options
- Further support for in-browser use such as use with
crypto-browserify
- Support for custom random byte streams such as
crypto-browserify
- Conflict in deployment CI workflow due to beta version
Complete TypeScript rewrite
- Support for arbitrary token lengths with full precision
- Complete avoidance of modulo bias (by default)
- Performance & memory optimisations achieving a constant
O(1)
run time (forlength
<=1000
) - Type declarations and type safety
- Various customisation options:
returnType
to specify returned token type asstring | number | bigint
skipPadding
to avoid leading zeroscustomMemory
to allocate a custom amount of memory to the algorithm
100%
test coverage
v1.x
has been deprecated in favour of fully superiorv2.x
- In order to achieve modulo precision with high performance, support of
BigInt
literals is required - New minimum required nodeJS version is
node >= 10.4.0
options.avoidModuloBias
has been deprecated as[email protected]
has this built-in
- Fixed occasional rounding error for token sizes
>= 12
- Fixed trailing zeros for token sizes
>=16
- Generating a single digit token on some environment settings would never return a
9
- Fixed sometimes slow performance when avoiding modulo bias
- Fixed occasional excessive memory usage when generating
20-digit
tokens