{"name":"num-sort","version":"4.0.0","description":"Sort an array of numbers","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/num-sort.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=20"},"scripts":{"test":"xo && ava"},"keywords":["sort","sorter","compare","comparator","number","numbers","order","asc","ascending","desc","descending"],"devDependencies":{"ava":"^6.4.1","xo":"^1.2.2"},"_id":"num-sort@4.0.0","gitHead":"9871c1a2123e6292ef6288d55cf9e897b92eda1d","types":"./index.d.ts","bugs":{"url":"https://github.com/sindresorhus/num-sort/issues"},"homepage":"https://github.com/sindresorhus/num-sort#readme","_nodeVersion":"20.19.5","_npmVersion":"10.9.2","dist":{"integrity":"sha512-sgEJmqC677TPPu01U7huK2776h+yBpvAfAJr73aOllR/BFDklVUtCnG6meqxpjBR0FY3TDb5vSiTPXaaUlppgA==","shasum":"227de004654b6da56beecba86feedbe8f5a48451","tarball":"http://registry-npm.ywwl.com/num-sort/download/num-sort-4.0.0.tgz","fileCount":5,"unpackedSize":4145,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHYnPAywZCV0c0Cxrbv8meR2f/6p+209XA0kOUerFwxdAiBAJ3/ZRWqxMm3cmormg8cMI7IjZjVTSHJiiMWtxdvqnw=="}],"size":1754,"noattachment":false,"key":"/num-sort/-/num-sort-4.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/num-sort_4.0.0_1758169894863_0.42366277241952477"},"_hasShrinkwrap":false,"readme":"# num-sort\n\n> Sort an array of numbers\n\n## Install\n\n```sh\nnpm install num-sort\n```\n\n## Usage\n\n```js\nimport {numberSortAscending, numberSortDescending} from 'num-sort';\n\n[9, -3, -Infinity, 24, NaN].sort(numberSortAscending);\n//=> [NaN, -Infinity, -3, 9, 24]\n\n[9n, 3n, 24n, -5n].sort(numberSortAscending);\n//=> [-5n, 3n, 9n, 24n]\n\n[9, -3, -Infinity, 24, NaN].sort(numberSortDescending);\n//=> [24, 9, -3, -Infinity, NaN]\n\n[9n, 3n, 24n, -5n].sort(numberSortDescending);\n//=> [24n, 9n, 3n, -5n]\n```\n\n## API\n\n### numberSortAscending\n\nAscending sort comparator.\n\nSupports both `number` and `bigint` types.\n\n### numberSortDescending\n\nDescending sort comparator.\n\nSupports both `number` and `bigint` types.\n\n## Related\n\n- [alpha-sort](https://github.com/sindresorhus/alpha-sort) - Alphabetically sort an array of strings\n\n","publish_time":1758169895052,"_cnpm_publish_time":1758169895052,"dist-tags":{"latest":"4.0.0"}}