This package has been deprecated

Author message:

NoLongerUsed

randomint

1.0.0 • Public • Published

randomint Build Status

Generate a random integer

Install

$ npm install --save randomint

Usage

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

randomInt(5);
//=> 3

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

API

randomInt(max)

Returns an integer from 0 to max.

randomInt(min, max)

Returns an integer from min to max.

min

Type: number
Default: 0

Minimum integer to return.

max

Type: number
Default: 1

Maximum integer to return.

License

MIT © Yoginth

Package Sidebar

Install

npm i randomint

Weekly Downloads

84

Version

1.0.0

License

MIT

Last publish

Collaborators

  • npm