{"name":"it-sort","version":"3.0.10","author":{"name":"Alex Potsides","email":"alex@achingbrain.net"},"license":"Apache-2.0 OR MIT","_id":"it-sort@3.0.10","maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"homepage":"https://github.com/achingbrain/it/tree/main/packages/it-sort#readme","bugs":{"url":"https://github.com/achingbrain/it/issues"},"dist":{"shasum":"cbd411f5180e50e589135bbfa61deac9cda7cf41","tarball":"http://registry-npm.ywwl.com/it-sort/download/it-sort-3.0.10.tgz","fileCount":9,"integrity":"sha512-xEORy3MHYU/GwmK/vragDdh7voACqh0qot0eb+ULlsFVHuMPjB6v/dlSAchAeOL66tqi5gAhw2RTEyySu7ZCYw==","signatures":[{"sig":"MEQCIGHlglMIC98xu1abq51GcOEI6remFiZhcgpzaZCX691xAiBdPClW1aOJupbjSqOAXPHeMaw/6F0JyoKCHuuLFNAtXA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/it-sort@3.0.10","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":17026,"size":4384,"noattachment":false,"key":"/it-sort/-/it-sort-3.0.10.tgz"},"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js","module-sync":"./src/index.js"}},"gitHead":"1761a098f1967777882dbf6554bdaf0bacf7fe17","release":{"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"release":"major","breaking":true},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github",["@semantic-release/git",{"assets":["CHANGELOG.md","package.json"]}]],"branches":["main"]},"scripts":{"lint":"aegir lint","test":"aegir test","build":"aegir build","clean":"aegir clean","release":"aegir release","dep-check":"aegir dep-check","test:node":"aegir test -t node --cov","test:chrome":"aegir test -t browser --cov","test:firefox":"aegir test -t browser -- --browser firefox","test:chrome-webworker":"aegir test -t webworker","test:firefox-webworker":"aegir test -t webworker -- --browser firefox"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:ee9199fb-ef1a-40ec-a2d7-0d037efa61e8"}},"repository":{"url":"git+https://github.com/achingbrain/it.git","type":"git"},"_npmVersion":"11.12.1","description":"Collects all values from an async iterator, sorts them using the passed function and yields them","directories":{},"_nodeVersion":"24.14.1","dependencies":{"it-all":"^3.0.0"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"aegir":"^47.1.1"},"_npmOperationalInternal":{"tmp":"tmp/it-sort_3.0.10_1775824769671_0.4010188160356305","host":"s3://npm-registry-packages-npm-production"},"readme":"# it-sort\n\n[![codecov](https://img.shields.io/codecov/c/github/achingbrain/it.svg?style=flat-square)](https://codecov.io/gh/achingbrain/it)\n[![CI](https://img.shields.io/github/actions/workflow/status/achingbrain/it/js-test-and-release.yml?branch=main\\&style=flat-square)](https://github.com/achingbrain/it/actions/workflows/js-test-and-release.yml?query=branch%3Amain)\n\n> Collects all values from an async iterator, sorts them using the passed function and yields them\n\n# About\n\n<!--\n\n!IMPORTANT!\n\nEverything in this README between \"# About\" and \"# Install\" is automatically\ngenerated and will be overwritten the next time the doc generator is run.\n\nTo make changes to this section, please update the @packageDocumentation section\nof src/index.js or src/index.ts\n\nTo experiment with formatting, please run \"npm run docs\" from the root of this\nrepo and examine the changes made.\n\n-->\n\nConsumes all values from an (async)iterable and returns them sorted by the passed sort function.\n\n## Example\n\n```javascript\nimport sort from 'it-sort'\nimport all from 'it-all'\n\nconst sorter = (a, b) => {\n  return a.localeCompare(b)\n}\n\n// This can also be an iterator, generator, etc\nconst values = ['foo', 'bar']\n\nconst arr = all(sort(values, sorter))\n\nconsole.info(arr) // 'bar', 'foo'\n```\n\nAsync sources must be awaited:\n\n```javascript\nimport sort from 'it-sort'\nimport all from 'it-all'\n\nconst sorter = (a, b) => {\n  return a.localeCompare(b)\n}\n\nconst values = async function * () {\n  yield * ['foo', 'bar']\n}\n\nconst arr = await all(sort(values, sorter))\n\nconsole.info(arr) // 'bar', 'foo'\n```\n\n# Install\n\n```console\n$ npm i it-sort\n```\n\n## Browser `<script>` tag\n\nLoading this module through a script tag will make its exports available as `ItSort` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/it-sort/dist/index.min.js\"></script>\n```\n\n# API Docs\n\n- <https://achingbrain.github.io/it/modules/it-sort.html>\n\n# License\n\nLicensed under either of\n\n- Apache 2.0, ([LICENSE-APACHE](https://github.com/achingbrain/it/blob/main/packages/it-sort/LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)\n- MIT ([LICENSE-MIT](https://github.com/achingbrain/it/blob/main/packages/it-sort/LICENSE-MIT) / <http://opensource.org/licenses/MIT>)\n\n# Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","publish_time":1775824769808,"_cnpm_publish_time":1775824769808,"dist-tags":{"latest":"3.0.11"}}