{"_id":"alphanum-sort","maintainers":[{"name":"trysound","email":"opensource@trysound.io"}],"keywords":["sort","alphanum","alphanumeric","natural","human"],"dist-tags":{"latest":"1.1.0"},"author":{"name":"Bogdan Chadkin","email":"opensource@trysound.io"},"description":"Alphanumeric sorting algorithm","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","repository":{"type":"git","url":"git+https://github.com/TrySound/alphanum-sort.git"},"users":{"ts-web":true,"rochejul":true},"bugs":{"url":"https://github.com/TrySound/alphanum-sort/issues"},"license":"MIT","versions":{"1.0.0":{"name":"alphanum-sort","version":"1.0.0","keywords":["sort","alphanum","alphanumeric","natural","human"],"author":{"name":"Bogdan Chadkin","email":"trysound@yandex.ru"},"license":"MIT","_id":"alphanum-sort@1.0.0","maintainers":[{"name":"trysound","email":"trysound@yandex.ru"}],"homepage":"https://github.com/TrySound/alphanum-sort","bugs":{"url":"https://github.com/TrySound/alphanum-sort/issues"},"dist":{"shasum":"df2c1e0c6406487bedc2f707eed25f9cd0f09e66","tarball":"https://devel.data-in-motion.biz/nexus/repository/npm-group/alphanum-sort/-/alphanum-sort-1.0.0.tgz","integrity":"sha512-ZFYPnjuuJcYC7kca2ernspt497c4mX7nhvHwebm+JD/b6UO4H4C5xbndpf8zm7e9T7sVaRwydqT+N3rVZXtTJQ==","signatures":[{"sig":"MEUCIQDa9iPrw4mRzKB7RyDepVmX/hxuVrHFg/D6dFFBdTYyKAIgV6ZsC/W4067c0pz5eSPyR/D+gzxhZN1dhBv067FEdRQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","files":["lib"],"_shasum":"df2c1e0c6406487bedc2f707eed25f9cd0f09e66","gitHead":"006772549df6763f415e3578d9fa54d74b4a9445","scripts":{"test":"eslint lib test.js && tape test.js | tap-spec"},"_npmUser":{"name":"trysound","email":"trysound@yandex.ru"},"repository":{"url":"https://github.com/TrySound/alphanum-sort.git","type":"git"},"_npmVersion":"2.7.4","description":"Alphanumeric sorting algorithm","_nodeVersion":"0.12.2","devDependencies":{"tape":"^4.2.0","eslint":"^1.5.1","tap-spec":"^4.1.0","javascript-natural-sort":"^0.7.1"},"directories":{}},"1.0.1":{"name":"alphanum-sort","version":"1.0.1","keywords":["sort","alphanum","alphanumeric","natural","human"],"author":{"name":"Bogdan Chadkin","email":"trysound@yandex.ru"},"license":"MIT","_id":"alphanum-sort@1.0.1","maintainers":[{"name":"trysound","email":"trysound@yandex.ru"}],"homepage":"https://github.com/TrySound/alphanum-sort","bugs":{"url":"https://github.com/TrySound/alphanum-sort/issues"},"dist":{"shasum":"571cdf3a955a3e92346860e9f08e5e5de503bf69","tarball":"https://devel.data-in-motion.biz/nexus/repository/npm-group/alphanum-sort/-/alphanum-sort-1.0.1.tgz","integrity":"sha512-UCwC1fE4FSPl3i9DsElkSmWNG97KBE2ZKzOjWihNkMRVEqKNb3yIreJNkNj2Jv6P399mDNXrHqm5p/aAN6bpVA==","signatures":[{"sig":"MEUCIQD3v5pqrBwB4TCXSv4n3bI4zzxsONWywvwUnh4Rux8MKAIgOx2BnNYn5KWSCLVtLD6h2FHO5jnUVCrSC0akC7etosQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","files":["lib"],"_shasum":"571cdf3a955a3e92346860e9f08e5e5de503bf69","gitHead":"bf64cac9d67d157d358812dac6336ba98af090a9","scripts":{"test":"eslint lib test.js && tape test.js | tap-spec"},"_npmUser":{"name":"trysound","email":"trysound@yandex.ru"},"repository":{"url":"https://github.com/TrySound/alphanum-sort.git","type":"git"},"_npmVersion":"2.7.4","description":"Alphanumeric sorting algorithm","_nodeVersion":"0.12.2","devDependencies":{"tape":"^4.2.0","eslint":"^1.5.1","tap-spec":"^4.1.0","javascript-natural-sort":"^0.7.1"},"directories":{}},"1.1.0":{"_id":"alphanum-sort@1.1.0","bugs":{"url":"https://github.com/TrySound/alphanum-sort/issues"},"dist":{"shasum":"490b83e739cd5ea35269cb501ba60a6159bbfc1b","tarball":"https://devel.data-in-motion.biz/nexus/repository/npm-group/alphanum-sort/-/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},"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"}},"1.0.2":{"name":"alphanum-sort","version":"1.0.2","keywords":["sort","alphanum","alphanumeric","natural","human"],"author":{"name":"Bogdan Chadkin","email":"trysound@yandex.ru"},"license":"MIT","_id":"alphanum-sort@1.0.2","maintainers":[{"name":"trysound","email":"trysound@yandex.ru"}],"homepage":"https://github.com/TrySound/alphanum-sort","bugs":{"url":"https://github.com/TrySound/alphanum-sort/issues"},"dist":{"shasum":"97a1119649b211ad33691d9f9f486a8ec9fbe0a3","tarball":"https://devel.data-in-motion.biz/nexus/repository/npm-group/alphanum-sort/-/alphanum-sort-1.0.2.tgz","integrity":"sha512-0FcBfdcmaumGPQ0qPn7Q5qTgz/ooXgIyp1rf8ik5bGX8mpE2YHjC0P/eyQvxu1GURYQgq9ozf2mteQ5ZD9YiyQ==","signatures":[{"sig":"MEQCIAijYMMAk3TZdNDkfbjAN43mC7P/2b39Et01pdxiopLLAiBAQR3sAivsa6IZw3PcmyV1cE3c8dxwbutB8xMSjXNI3g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","files":["lib"],"_shasum":"97a1119649b211ad33691d9f9f486a8ec9fbe0a3","gitHead":"c91a8ad765d3adacf4a7186637ad6f39cad540f6","scripts":{"test":"eslint lib test.js && tape test.js | tap-spec"},"_npmUser":{"name":"trysound","email":"trysound@yandex.ru"},"repository":{"url":"https://github.com/TrySound/alphanum-sort.git","type":"git"},"_npmVersion":"2.7.4","description":"Alphanumeric sorting algorithm","_nodeVersion":"0.12.2","devDependencies":{"tape":"^4.2.0","eslint":"^1.5.1","tap-spec":"^4.1.0","javascript-natural-sort":"^0.7.1"},"directories":{}}},"name":"alphanum-sort","time":{"created":"2015-09-27T00:12:28.223Z","modified":"2026-08-27T06:07:44.747Z","1.0.0":"2015-09-27T00:12:28.223Z","1.0.1":"2015-09-27T14:18:35.765Z","1.1.0":"2026-08-22T10:03:28.799Z","1.0.2":"2015-10-03T20:12:49.185Z"},"readmeFilename":"README.md","homepage":"https://github.com/TrySound/alphanum-sort"}