Closed aweary closed 8 years ago
Why? What do you need it for?
Using the same slideshow example, you could specify how many pictures in a row are unique. Avoiding possible scenarios like picture1 => picture3 => picture1
I think this would make more sense as a separate module.
For reference: Aweary/unique-random-at-depth
Currently
unique-random
only guarantees a unique random value at a depth of 1 in the call history. We can potentially add a third optional argumentdepth
where users can specifiy how many calls deep the returned value should be compared against. So something likewould mean that the returned value would be unique relative to the last 3 calls.
I'm just wondering if this is something you'd be interested in supporting. If so I can PR. I can fork it otherwise.