https://github.com/ccampbell/static-shuffle
Create a deterministic shuffle of an array given a seed
https://github.com/ccampbell/static-shuffle
Last synced: 3 months ago
JSON representation
Create a deterministic shuffle of an array given a seed
- Host: GitHub
- URL: https://github.com/ccampbell/static-shuffle
- Owner: ccampbell
- Created: 2020-08-28T04:38:02.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-28T04:43:15.000Z (over 5 years ago)
- Last Synced: 2025-09-06T13:44:30.541Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 30.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Static shuffle
Create a deterministic shuffle of an array given a seed
## Install
```
npm install static-shuffle
```
## Usage
```javascript
const shuffle = require('static-shuffle');
shuffle(['Apple', 'Banana', 'Blueberry', 'Orange', 'Strawberry', 'Watermelon'], 'anything you want!');
// result
// ['Blueberry', 'Watermelon', 'Orange', 'Strawberry', 'Apple', 'Banana']
```