README
nano-shuffle
Fast'n'tiny shuffle array function, Durstenfeld shuffle algorithm. Copy-pasta from stackoverflow.
Install
npm install n-shuffle
Use
import shuffle from 'n-shuffle';
const list = [1, 2, 3];
shuffle(list);
Durstenfeld shuffle for ES6
<script type="module">
import nShuffle from 'https://cdn.skypack.dev/n-shuffle';
</script>
Fast'n'tiny shuffle array function, Durstenfeld shuffle algorithm. Copy-pasta from stackoverflow.
npm install n-shuffle
import shuffle from 'n-shuffle';
const list = [1, 2, 3];
shuffle(list);