crypto-random-in-range
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

Crypto Random In Range

Pick a cryptographically-random integer within a range.

Install

npm install --save crypto-random-in-range

Usage

import inRange from 'crypto-random-in-range';

inRange ( 0, 100 ); // => 76n
inRange ( 0n, 100n ); // => 61n
inRange ( 0n, 9999999999999999999999999999999999999999n ); // => 6084146398709470868721131064012104523887n

License

MIT © Fabio Spampinato

Package Sidebar

Install

npm i crypto-random-in-range

Weekly Downloads

61

Version

2.0.0

License

none

Unpacked Size

5.42 kB

Total Files

10

Last publish

Collaborators

  • fabiospampinato