random-uniq1.0.1 • Public • Published
Generates random integers that are unique successively. Useful for generating random items that you don't want to appear consecutively after each call.
npm install --save random-uniq
const randomUniq = require('random-uniq') const randomInt = randomUniq(0, 15) console.log(randomInt(), randomInt(), randomInt(), randomInt()) // prints - 10, 3, 9