@extra-array/shuffle.min

2.3.2 • Public • Published

Rearranges values in arbitrary order.

This is part of package extra-array.

This is browserified, minified version of @extra-array/shuffle.
It is exported as global variable array_shuffle.
CDN: unpkg, jsDelivr.

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 ]

references

Dependents (0)

Package Sidebar

Install

npm i @extra-array/shuffle.min

Weekly Downloads

0

Version

2.3.2

License

MIT

Unpacked Size

5.05 kB

Total Files

5

Last publish

Collaborators

  • wolfram77