@voidvoxel/random-integer
v1.0.1
Published
Generate random integers
Downloads
2
Readme
@voidvoxel/random-integer
Generate random integers
Installation
npm i @voidvoxel/random-integer
Usage
Import
Module
import randomInteger from '@voidvoxel/random-integer';
CommonJS
const randomInteger = require('@voidvoxel/random-integer');
Pick a positive integer
randomInteger()
Pick a negative integer
randomInteger(-Infinity)
Pick an integer between 0 and 3
randomInteger(3)
Pick an integer between 1 and 10
randomInteger(1, 10)
Pick an integer between -100 and 100
randomInteger(-100, 100)