static-shuffle
v1.0.0
Published
Creates a deterministic shuffle of an input array based on a provided seed
Downloads
6
Readme
Static shuffle
Create a deterministic shuffle of an array given a seed
Install
npm install static-shuffle
Usage
const shuffle = require('static-shuffle');
shuffle(['Apple', 'Banana', 'Blueberry', 'Orange', 'Strawberry', 'Watermelon'], 'anything you want!');
// result
// ['Blueberry', 'Watermelon', 'Orange', 'Strawberry', 'Apple', 'Banana']