4.2.0 • Published 1 year ago

just-random-integer v4.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

just-random-integer

Part of a library of zero-dependency npm modules that do just do one thing. Guilt-free utilities for every occasion.

🍦 Try it

npm install just-random-integer
yarn add just-random-integer

Produces a random integer within a given range

import random from 'just-random-integer';

random();
// Returns either 0 or 1
random(5);
// Returns a random integer between 0 and 5 (inclusively)
random(3, 10);
// Returns a random integer between 3 and 10 (inclusively)
random(-5.8, 10.4);
// Returns a random integer between -5 and 10 (inclusively)
4.2.0

1 year ago

4.1.0

2 years ago

4.1.1

2 years ago

4.0.0

2 years ago

3.0.1

2 years ago

3.0.0

3 years ago

2.1.1

3 years ago

2.1.0

3 years ago

1.0.0

3 years ago