Skip to content

Repository files navigation

Random Number

Get a random number within a range.

npm npm downloads CI codecov

Usage

ESM only, types included: the same import works in Node.js, Bun and browsers.

import { randomNumber } from "@ultirequiem/random-number";

randomNumber(); //=> 1 ... 100
randomNumber({ min: 10 }); //=> 10 ... 100
randomNumber({ min: 235, max: 239 }); //=> 235 ... 239
randomNumber({ integer: false }); //=> 0 ... 0.9

Support

Open an Issue, I will check it as soon as possible 👀

If you want to hurry me up a bit send me a tweet 😆

Don't forget to star the repo ⭐

Versioning

We use SemVer for versioning. For the versions available, see the tags.

Authors

Eliaz Bobadilla (a.k.a UltiRequiem) - Creator and Maintainer 💪

See also the full list of contributors who participated in this project.

Licence

Licensed under the MIT License.

Releases

Packages

Used by

Contributors

Languages