{"name":"shuffle-array","version":"0.0.1-security","description":"This package name is not currently in use, but was formerly occupied by a popular package. To avoid malicious use, npm is hanging on to the package name, but loosely, and we'll probably give it to you if you want it.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/npm/security-holder.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/npm/security-holder/issues"},"homepage":"https://github.com/npm/security-holder#readme","gitHead":"d1719e2a152734ed854065de56039770c9104d83","_id":"shuffle-array@0.0.1-security","_shasum":"efa10d6da657796da19705678307da9920963ddb","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.1.0","_npmUser":{"name":"npm","email":"npm@npmjs.com"},"dist":{"shasum":"efa10d6da657796da19705678307da9920963ddb","tarball":"http://registry-npm.ywwl.com/shuffle-array/download/shuffle-array-0.0.1-security.tgz","integrity":"sha512-BmAYlP6K/2uu/W0LwdTTWAOkbabDmmsgsQbASuV8kUSVCqqa/FfJhwFlHrMlEkU0G3rnMW5c+QoA3mjKrOlT7A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCiZ46eK6ypAsetBJTilZ1OKLSM83Ufr0ZKcfh/gnUexAIhAOfPJIqlP+dNObdK5kbc3+SSSVbnKnQtqg+w2H/fVl3U"}],"size":581,"noattachment":false,"key":"/shuffle-array/-/shuffle-array-0.0.1-security.tgz"},"maintainers":[{"name":"nj48","email":"spam@njohnson.me"}],"directories":{},"readme":"# shuffle-array\n\n[![NPM version][npm-image]][npm-link] [![License][lic-image]][npm-link] [![Build status][travis-image]][travis-link] [![Coverage Status][coverage-image]][coverage-link] [![devDependency status][devdeps-image]][devdeps-link] [![downloads][dt-image]][npm-link]\n\n> Randomize the order of the elements in a given array using the [Fisher-Yates algorithm](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle).\n\n## Installation\n\n    $ npm install shuffle-array\n\n    $ bower install shuffle-array\n\n    $ component install pazguille/shuffle-array\n\n## Usage\n```js\nvar shuffle = require('shuffle-array'),\n    collection = [1,2,3,4,5];\n\nshuffle(collection);\n\nconsole.log(collection); // returns [4, 3, 1, 5, 2]\n```\n\n## API\n\n### shuffle(arr, [options])\nRandomizes the order of the elements in a given `array`.\n- `arr` - The given array.\n- [`options`] {Object} - Optional configuration options.\n- [`options.copy`] {Boolean} - Sets if should return a shuffled copy of the given array. By default it's a falsy value.\n- [`options.rng`] {Function} - Specifies a custom random number generator.\n\n```js\nshuffle([1,2,3,4,5]); // returns [4, 3, 1, 5, 2]\n\n// Return a copy of the given array\nshuffle([1,2,3,4,5], { 'copy': true }); // returns [4, 3, 1, 5, 2] (copied)\n```\n\n### shuffle.pick(arr, [options])\nPick one or more `random` elements from the given `array`.\n- `arr` - The given array.\n- [`options`] {Object} - Optional configuration options.\n- [`options.picks`] {Number} - Specifies how many random elements you want to pick. By default it picks 1.\n- [`options.rng`] {Function} - Specifies a custom random number generator.\n\n```js\nshuffle.pick([1,2,3,4,5]); // returns 5\n\n// Return a random collection with 2 elements\nshuffle.pick([1,2,3,4,5], { 'picks': 2 })); // returns [4, 3]\n```\n\n## Build\n\n    npm run dist\n\n## Test\n\n    npm test\n\n## With :heart: by\n- Guille Paz (Front-end developer | Web standards lover)\n- E-mail: [guille87paz@gmail.com](mailto:guille87paz@gmail.com)\n- Twitter: [@pazguille](http://twitter.com/pazguille)\n- Web: [http://pazguille.me](http://pazguille.me)\n\n## License\nMIT license. Copyright © 2014.\n\n[npm-image]: https://img.shields.io/npm/v/shuffle-array.svg\n[lic-image]: https://img.shields.io/npm/l/shuffle-array.svg\n[npm-link]: https://npmjs.org/package/shuffle-array\n[travis-image]: https://img.shields.io/travis/pazguille/shuffle-array.svg\n[travis-link]: https://travis-ci.org/pazguille/shuffle-array\n[devdeps-image]: https://img.shields.io/david/dev/pazguille/shuffle-array.svg\n[devdeps-link]: https://david-dm.org/pazguille/shuffle-array#info=devDependencies\n[dt-image]: https://img.shields.io/npm/dt/shuffle-array.svg\n[coverage-image]: https://img.shields.io/coveralls/pazguille/shuffle-array.svg\n[coverage-link]: https://coveralls.io/github/pazguille/shuffle-array\n","publish_time":1458771724178,"_cnpm_publish_time":1458771724178,"dist-tags":{"latest":"1.0.1"}}