1.0.1 • Published 9 years ago

random-uniq v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

random-uniq Build Status

Generates random integers that are unique successively. Useful for generating random items that you don't want to appear consecutively after each call.

Install

npm install --save random-uniq

Usage

const randomUniq = require('random-uniq')
const randomInt = randomUniq(0, 15)

console.log(randomInt(), randomInt(), randomInt(), randomInt())
// prints - 10, 3, 9