Randomly get unique item from array
Randomly get unique (non-repeating) item from array that's never the same as the previous.
Usage
const RandomList = require('runique-array')
const list = ['some', 'items', 'in', 'list']
const randomList = new RandomList(list)
randomList.getRandom()
randomList.getRandom()
randomList.getRandom()
randomList.getRemainingLength()
randomList.resetRemainingItems()
randomList.getRemainingLength()
randomList.getRandom()
randomList.getRandom()
randomList.getRandom()
randomList.getRandom()
randomList.getRandom()
const randomList2 = new RandomList(list, { repeatLoop: true })
randomList.getRandom()
randomList.getRandom()
randomList.getRandom()
randomList.getRandom()
randomList.getRandom()
randomList.getRandom()
randomList.getRandom()
License
MIT