{"_id":"@caldwell619/array-shuffle","_rev":"2-1511733ca1436dd12e8872333f77a356","name":"@caldwell619/array-shuffle","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"@caldwell619/array-shuffle","version":"0.0.1","description":"Dead simple array shuffling","main":"dist/index.js","module":"dist/index.module.js","source":"src/index.ts","scripts":{"format":"prettier --write .","lint":"eslint ./ --ext .js,.ts","test":"jest","type-check":"tsc --noEmit","build":"microbundle --compress --target node","release":"standard-version","publish-release":"git push --follow-tags origin master && yarn publish","deploy":"sh scripts/publish.sh"},"repository":{"type":"git","url":"git@github.com:christopher-caldwell/array-shuffle.git"},"bugs":{"url":"https://github.com/christopher-caldwell/array-shuffle/issues"},"keywords":["array","shuffle","random"],"author":{"name":"u/christopher-caldwell"},"license":"MIT","devDependencies":{"@types/jest":"^26.0.20","@typescript-eslint/eslint-plugin":"^2.33.0","@typescript-eslint/parser":"^2.33.0","colors":"1.4.0","eslint":"^7.20.0","eslint-plugin-prettier":"^3.3.1","jest":"26.6.3","microbundle":"^0.13.0","prettier":"^2.0.5","standard-version":"^9.1.1","ts-jest":"26.5.6","typescript":"^4.1.5"},"licenseText":"MIT License\n\nCopyright (c) 2021 GitHub user u/christopher-caldwell\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@caldwell619/array-shuffle@0.0.1","dist":{"shasum":"0d462681ddc5f516518540edf2b1cbb36670f7ea","integrity":"sha512-kJyTZch75Ir4VrvL0DeBvaYKHkpMpHcSCi7pwfXh5V6rGg38suJrWShqw+hH45+G+PqGp0TcCXP4A/ZbqNQOmQ==","tarball":"https://registry.npmjs.org/@caldwell619/array-shuffle/-/array-shuffle-0.0.1.tgz","fileCount":16,"unpackedSize":52229,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtl8kCRA9TVsSAnZWagAA85MQAJBRoPv6VbnYccujdpj8\ngJ60YmuHSQJqG2c2XN9sWV/CH6ls9TkXXa/b45qc7eVRe39RHEneRPosUHJ/\nUd3PiE6/c4del5ZtOkN2cEeeiN6S69jqYIYT+RHk80/h3M0TNSByZUON9R8Q\nkY6to2Aik9ZFY7Q3ibL7gTPt0F7ez8PKH8CcrqQp0V2U7E6cbyaxBjFOIr5s\nnxphIwjI2c9/dZ0/+IfJ+4LixNduEt7KqffLsy9DIbodaEAzxUMwv9VJbRH5\nDdqOJFqV9ymxDUChSKT2Q7nxhwE8tcVOKD2KwEbc/0dN7LqxWpCejcPtiwvh\nfz7K+aKJ0RNMLuOQXPSIgJxBZf99GhibsMABtGXMzumaxIF0G27BdP57DmJV\nwoo1cRJ80FAXBejrHFpmKaYkg8c77v6mcjjKGJbJ+2qVOspOTMTaVPiiYjLV\nRKcxyrQ2H7ZkHhLk7uNxxABlYqdZGvelQfu3EJoPOTQQw14s2Fz+X7CVoYHy\nAcT3BXrhgjWE6p+hA0iuB9gWAkf3fkRjXk+Sb6UwxMuK1arOsBP0i0RYWq1v\nrCL+a6gGapOpQJ18XZWDgpKZcBd2vyj4kObE7UkmDuB78ttT5bFAUxg2yyry\nyd+hMcbVYOUmrCKHG1oYSaKaD3FNL22SXK5E6I+TsfTix3KFxbwRnPYwit10\n654T\r\n=iYkU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDgclePjhaBg5D1749ER8Q47hqdix/jmmewB/A6TxNMRAIhAJ85TSlpWKboRsCqR7QnxlfrDIgYSMY7A80NXGRJCkxL"}]},"_npmUser":{"name":"caldwell619","email":"caldwell8814@gmail.com"},"directories":{},"maintainers":[{"name":"caldwell619","email":"caldwell8814@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/array-shuffle_0.0.1_1622564643797_0.8910131634326564"},"_hasShrinkwrap":false},"0.0.3":{"name":"@caldwell619/array-shuffle","version":"0.0.3","description":"Dead simple array shuffling","main":"dist/index.js","module":"dist/index.module.js","source":"src/index.ts","scripts":{"format":"prettier --write .","lint":"eslint ./ --ext .js,.ts","test":"jest","type-check":"tsc --noEmit","build":"microbundle --compress --target node","release":"standard-version","publish-release":"git push --follow-tags origin master && yarn publish","deploy":"sh scripts/publish.sh"},"repository":{"type":"git","url":"git@github.com:christopher-caldwell/array-shuffle.git"},"bugs":{"url":"https://github.com/christopher-caldwell/array-shuffle/issues"},"keywords":["array","shuffle","random"],"author":{"name":"u/christopher-caldwell"},"license":"MIT","devDependencies":{"@types/jest":"^26.0.20","@typescript-eslint/eslint-plugin":"^2.33.0","@typescript-eslint/parser":"^2.33.0","colors":"1.4.0","eslint":"^7.20.0","eslint-plugin-prettier":"^3.3.1","jest":"26.6.3","microbundle":"^0.13.0","prettier":"^2.0.5","standard-version":"^9.1.1","ts-jest":"26.5.6","typescript":"^4.1.5"},"licenseText":"MIT License\n\nCopyright (c) 2021 GitHub user u/christopher-caldwell\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@caldwell619/array-shuffle@0.0.3","dist":{"shasum":"37b9d2884e9cff30c3199432da5eed1692f9feae","integrity":"sha512-VEKvaZyYkg+wJp57vaMKSwgS+VuUrT9MuDjt6bB4chwY8xuCGIpfPET+AWB9BJuMpkF5jilBEfRujkEB/eZTXA==","tarball":"https://registry.npmjs.org/@caldwell619/array-shuffle/-/array-shuffle-0.0.3.tgz","fileCount":15,"unpackedSize":12097,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvV7LCRA9TVsSAnZWagAA+CsP/jR80S73CkR5CDGf1fjg\nHU8GcmQMDdWDNJuXnKgBdDOMQs7LeDkN6UqOHQW9xUUoQnS/b14TPcly0t0H\nq8k5byMnIZah807bPvczrqD43N02eNUWicy4zwegDk10EU35KUvY3ciRPQsh\nRaTA8c+UKyJTSxHt35TMXZOql7llGcaO/z3WifJwYumNBKBeyxVrztmG+7EX\nntDdXAoTn8eIqT2KvNtV883dgxq68X8OE6lpCW8mt3fspnvInCb3Xq33HTs5\nE7KVWLGjTEcxwB9BjSFlhL3YycNASz8nttv0oF1TL8vq7GUQHBLgm78RQZEh\nyTIRFGFFdiH/9mTEGtCrKU0LojtW2LTFgl00ruwxSxISdxvt5SpcgknbMguF\n/TZkL6VhGcF1zEW4HzREYR4qZOZftF4MPg0YlGUMKH2pKpUJwrXdYkj48b+1\nQhRT9QNjB5XYAiAEtz7jIRddHOj59IPqVT1bgTreRP1KpeNy5LkJyF3CIL6g\nT8MPbODA93cvkusRaCK/kv9fxQTqJIHDFC0oI/Cjsi/SBlIJRpUlqh8oUsJm\n/oKVFYSxKKFgw7bNNYuIP6ECYe1aM7eFbDcZShrmGHnb3YUmE2aa5YzzEBSN\nba1B59kg88A+yD0PAaWg8+V5+yz23PWQX/pUC508L7ZE63cSvy2fZE4N3AuP\nIrIQ\r\n=HY02\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAOqZlewWehWIaddxoDeMOpuHSYt9NmN7t0mlmQV7vpBAiEAgXRYavUXawpeCb28SEehIZVSKb7oSGfbLzMnB9zOYSU="}]},"_npmUser":{"name":"caldwell619","email":"caldwell8814@gmail.com"},"directories":{},"maintainers":[{"name":"caldwell619","email":"caldwell8814@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/array-shuffle_0.0.3_1623023307155_0.9035924911622675"},"_hasShrinkwrap":false}},"time":{"created":"2021-06-01T16:24:03.712Z","0.0.1":"2021-06-01T16:24:03.944Z","modified":"2022-04-04T21:31:51.423Z","0.0.3":"2021-06-06T23:48:27.302Z"},"maintainers":[{"name":"caldwell619","email":"caldwell8814@gmail.com"}],"description":"Dead simple array shuffling","keywords":["array","shuffle","random"],"repository":{"type":"git","url":"git@github.com:christopher-caldwell/array-shuffle.git"},"author":{"name":"u/christopher-caldwell"},"bugs":{"url":"https://github.com/christopher-caldwell/array-shuffle/issues"},"license":"MIT","readme":"# Array Shuffle\n\nDead simple array shuffling\n\n<p align=\"center\">\n  <h4/>\n  <a href='https://www.npmjs.com/package/@caldwell619/array-shuffle'>\n    <img src=\"https://img.shields.io/npm/v/@caldwell619/array-shuffle\">\n  </a>\n  <a href='https://bundlephobia.com/result?p=@caldwell619/array-shuffle'>\n    <img src=\"https://img.shields.io/bundlephobia/min/@caldwell619/array-shuffle\">\n  </a>\n  <img src=\"https://codecov.io/gh/christopher-caldwell/array-shuffle/branch/master/graph/badge.svg?token=2LA7ETDPO3\">\n  <img src=\"https://img.shields.io/github/last-commit/christopher-caldwell/array-shuffle\">\n  <img src=\"https://img.shields.io/npm/types/@caldwell619/array-shuffle\">\n</p>\n\n## Installation\n\n```bash\n# Yarn\nyarn add @caldwell619/array-shuffle\n\n# NPM\nnpm install --save @caldwell619/array-shuffle\n```\n\n## Usage\n\n1 main utility is exposed:\n\n```ts\nimport { shuffle } from '@caldwell619/array-shuffle'\n\nconst shuffledArray = shuffle([1, 2, 3]) // [3,2,1] or [2,1,3] or [3,1,2]\n```\n\n## Options\n\nDue to RNG, small sets have the potential to be in the same order as the returned \"shuffled\" set.\n\nAn optional \"options\" object is available as the second argument, with just one key.\n\n### Ensuring Unique Return\n\n```ts\nimport { shuffle } from '@caldwell619/array-shuffle'\n\nconst shuffledArray = shuffle([1, 2, 3], { shouldEnsureUnique: true }) // [3,2,1] or [2,1,3] or [3,1,2]\n```\n\nProviding this flag will never return the same set. This adds a small amount of computation of course, so it **is false by default**.\n","readmeFilename":"README.md"}