Popularity
1.8
Growing
Activity
1.7
Declining
71
6
14

Monthly Downloads: 0
Programming language: JavaScript
License: MIT License
Tags: Number     Math     Generator     Generate     Random     Rand     Num     Gen     Min     Max     Integer     Int     Randomize    
Latest version: v2.0.1

random-int alternatives and similar modules

Based on the "Number" category.
Alternatively, view random-int alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of random-int or a related project?

Add another 'Number' Module

README

random-int Build Status

Generate a random integer

Install

$ npm install random-int

Usage

const randomInt = require('random-int');

randomInt(5);
//=> 3

randomInt(10, 100);
//=> 54

API

randomInt([maximum])

Returns an integer from 0 to maximum.

randomInt(minimum, maximum)

Returns an integer from minimum to maximum.

minimum

Type: number Default: 0

Minimum integer to return.

maximum

Type: number Default: 1

Maximum integer to return.

Related

License

MIT © Sindre Sorhus


*Note that all licence references and agreements mentioned in the random-int README section above are relevant to that project's source code only.