Package Exports
- @extra-array/shuffle
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@extra-array/shuffle) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Rearranges values in arbitrary order.
This is part of package extra-array.
array.shuffle(x, [n]);
// x: an array
// n: random seed 0->1
const array = require('extra-array');
var x = [1, 2, 3, 4, 5];
array.shuffle(x);
// [ 1, 5, 4, 3, 2 ]
array.shuffle(x, 0.3);
// [ 4, 5, 2, 3, 1 ]
array.shuffle(x, 0.3);
// [ 4, 5, 2, 3, 1 ]