{"_id":"alphanum-sort@1.1.0","bugs":{"url":"https://github.com/TrySound/alphanum-sort/issues"},"dist":{"shasum":"490b83e739cd5ea35269cb501ba60a6159bbfc1b","tarball":"http://registry-npm.ywwl.com/alphanum-sort/download/alphanum-sort-1.1.0.tgz","fileCount":6,"integrity":"sha512-BJi4rD9PUHyKndc1VXv0nnZxZikJsicoGLTw9CPRoNctQZ9sA0Z8yDecUby1qd5T3MsLqEh8wPF8EjxUOW8DhQ==","signatures":[{"sig":"MEUCIQCniWrGC6NnOBJLW/JEmX9GW50rzDFHZk3XbvpdS3KPIQIgGAsFouL9CPWevKAY289d5XAKJBBorvqechHds1jIyoo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHig0HJ9KGjtT2GDjg7xU/EtkqHNsCie5ye77KvYGsN5AiEAja2lC+D4QObQDfM+Qg9l0y6GChId0kMxQAComHWDERA="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/alphanum-sort@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":7060,"size":3000,"noattachment":false,"key":"/alphanum-sort/-/alphanum-sort-1.1.0.tgz"},"main":"lib/index.js","name":"alphanum-sort","types":"lib/index.d.ts","author":{"name":"Bogdan Chadkin","email":"opensource@trysound.io"},"gitHead":"6b3ce5e2c1cb07895ffb9b445281f314c5401af0","license":"MIT","scripts":{"test":"node test.js"},"version":"1.1.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:1eaace1f-667c-45a4-b9fe-647a68235297"}},"homepage":"https://github.com/TrySound/alphanum-sort","keywords":["sort","alphanum","alphanumeric","natural","human"],"repository":{"url":"git+https://github.com/TrySound/alphanum-sort.git","type":"git"},"_npmVersion":"11.19.0","description":"Alphanumeric sorting algorithm","directories":{},"maintainers":[{"name":"trysound","email":"opensource@trysound.io"}],"_nodeVersion":"24.19.0","_hasShrinkwrap":false,"devDependencies":{"javascript-natural-sort":"^0.7.1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/alphanum-sort_1.1.0_1787393008703_0.29857105644175586"},"readme":"# alphanum-sort\n\n[![CI](https://github.com/TrySound/alphanum-sort/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/TrySound/alphanum-sort/actions/workflows/ci.yml)\n\nFast, natural-order sorting for strings and numbers.\n\nUnlike lexicographic sorting, `alphanum-sort` compares numeric parts by value, so\n`item2` comes before `item10`. It supports mixed values, leading zeros, signs,\nand case-insensitive comparisons without modifying the input array.\n\n## Install\n\n```sh\nnpm install alphanum-sort\n```\n\n## Usage\n\n```js\nvar sort = require('alphanum-sort');\n\nvar items = ['item20', 'item19', 'item1', 'item10', 'item2'];\nvar result = sort(items);\n\nconsole.log(result);\n// ['item1', 'item2', 'item10', 'item19', 'item20']\n```\n\n### Case-insensitive sorting\n\n```js\nsort(['A', 'C', 'E', 'b', 'd', 'f'], { insensitive: true });\n// ['A', 'b', 'C', 'd', 'E', 'f']\n```\n\n### Signed numbers\n\n```js\nsort(['10', '-1', '5', '-20'], { sign: true });\n// ['-20', '-1', '5', '10']\n```\n\n## API\n\n### `sort(array[, options])`\n\nReturns a sorted copy of `array`. Values are compared as strings but retain\ntheir original types in the returned array.\n\n#### `options.insensitive`\n\n- Type: `Boolean`\n- Default: `false`\n\nCompare values without regard to letter case.\n\n#### `options.sign`\n\n- Type: `Boolean`\n- Default: `false`\n\nTreat `+` and `-` immediately before digits as numeric signs.\n\n## Development\n\n```sh\nnpm install\nnpm test\n```\n\nThe test suite supports Node.js 0.10 and newer.\n\n## License\n\n[MIT](LICENSE) © [Bogdan Chadkin](https://github.com/TrySound)\n","publish_time":1787393008799,"_cnpm_publish_time":1787393008799,"dist-tags":{"latest":"1.1.0"}}