https://github.com/fabiospampinato/crypto-random-in-range
Pick a cryptographically-random integer within a range.
https://github.com/fabiospampinato/crypto-random-in-range
between crypto number pick random range
Last synced: 8 months ago
JSON representation
Pick a cryptographically-random integer within a range.
- Host: GitHub
- URL: https://github.com/fabiospampinato/crypto-random-in-range
- Owner: fabiospampinato
- License: mit
- Created: 2022-02-06T04:45:15.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-01-14T21:31:23.000Z (over 1 year ago)
- Last Synced: 2025-09-21T11:57:59.898Z (9 months ago)
- Topics: between, crypto, number, pick, random, range
- Language: JavaScript
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# Crypto Random In Range
Pick a cryptographically-random integer within a range.
## Install
```sh
npm install crypto-random-in-range
```
## Usage
```ts
import inRange from 'crypto-random-in-range';
// Let's pick a random number within some ranges
inRange ( 0, 100 ); // => 76n
inRange ( 0n, 100n ); // => 61n
inRange ( 0n, 9999999999999999999999999999999999999999n ); // => 6084146398709470868721131064012104523887n
```
## License
MIT © Fabio Spampinato