Package Exports
- shake-array
- shake-array/index.js
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 (shake-array) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
shakeArray
shakeArray is a function to randomize the position of elements in an array.
Installation
Use the package manager npm to install shakeArray.
npm install shake-array
Usage
import shakeArray from 'shake-array';
const arr = [1, 2, 3, 4, 5];
const modifiedArr = shakeArray(arr);
console.log(modifiedArr);
// expected output : [2, 5, 1, 3, 4]
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.