Get consecutively unique elements from an array
Useful for things like slideshows where you don't want to have the same slide twice in a row.
$ npm install --save unique-random-array
var uniqueRandomArray = ;var rand = ;console;//=> 4 2 1 4
Returns a function that when called will return a random element that's never the same as the previous.
unique-random- Generate random numbers that are consecutively unique
MIT © Sindre Sorhus