{"_id":"@cablanchard/koelle-sort","_rev":"1-3aa7f77f0c50e9ecf02ed775d5058ea3","name":"@cablanchard/koelle-sort","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@cablanchard/koelle-sort","version":"0.1.0","description":"koelle-sort - also known as alphanum sort","repository":{"type":"git","url":"git+ssh://git@github.com/cblanc/koelle-sort.git"},"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test":"npm run lint && NODE_ENV=test node_modules/.bin/nyc node_modules/.bin/mocha --opts mocha.opts","lint":"tslint -c tslint.json -p tsconfig.json lib/**/*.ts","build":"npm run lint && node_modules/.bin/tsc","benchmark":"ts-node benchmark.js","coverage":"nyc report --reporter=text-lcov | node_modules/.bin/coveralls || true","prepare":"npm run build"},"nyc":{"include":["lib/**/*.ts"],"exclude":["dist/*"],"extension":[".ts"],"require":["ts-node/register"],"reporter":["text-summary","html"],"sourceMap":true,"instrument":true,"all":true},"engines":{"node":">=6.9"},"author":{"name":"cblanc"},"license":"MIT","devDependencies":{"@types/benchmark":"~1.0.31","@types/chai":"~4.1.4","@types/mocha":"~5.2.3","@types/node":"~10.5.1","alphanumeric-sort":"0.0.1","benchmark":"~2.1.4","chai":"~4.1.2","coveralls":"~3.0.1","javascript-natural-sort":"~0.7.1","mocha":"~5.2.0","natural-orderby":"~1.0.0","natural-sort":"~1.0.0","nyc":"~12.0.2","source-map-support":"~0.5.6","ts-node":"~7.0.0","tslint":"~5.10.0","typescript":"~2.9.2","typings":"~2.1.1"},"dependencies":{},"gitHead":"db0b5a6daaa6b2bc6d040a150ad193e62202ea38","bugs":{"url":"https://github.com/cblanc/koelle-sort/issues"},"homepage":"https://github.com/cblanc/koelle-sort#readme","_id":"@cablanchard/koelle-sort@0.1.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.3","_npmUser":{"name":"cablanchard","email":"cablanchard@gmail.com"},"dist":{"integrity":"sha512-GO49hnXU6hKXDIMrqwW8eLtJBlEKX5kXkG5NQ9soiUB/sTAxx5TDPaR5H9XPnnr1OT8iDsAMMMQtsmib18TM2Q==","shasum":"c6dc8a7086212f58ec9c2d64a24c6f9216b4921b","tarball":"https://registry.npmjs.org/@cablanchard/koelle-sort/-/koelle-sort-0.1.0.tgz","fileCount":10,"unpackedSize":11302,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbOVraCRA9TVsSAnZWagAAXPcP/1pW0XrftVfFjI2T7Kll\nDGUxzpYAs9sZasnq5nAtlp6qTgADt5d5QAJVupMIjAEjVBQqc7UkBgUW9Fsc\nOAQC/fb6fpsOeERqcnzqXZH1P2xcW43GiwmyQHV8wEwyAMG7mWuJj1Ves0DJ\nkzYlXk3fHDFrXbtwmXDhSQR5Krr7b9lbInq2/crlK62eOEuDzUirS/4obi8x\nDbzdMQrCpmZLpZA+h9+glarKad/Y8W5fmqXXthzCdeGAAGw36e0b9TS/PCHz\n4wY/a88K/zFTw1l1dLKA1j+WE7OzdjGSFKOeZDsy36ree9cYqzPv/JDgHBv1\nWxZuLrs1tmFbzhfMfkbgWLdkbzTBZl34egvilQp1pIr4go6IPZcfK4CyI1Kd\nQ2RrO7Fo0rpjFFw0VcwsBC/czqtoVLpudk3aAp/BlI9RqghvEl0djFspFFZ3\nY8Ws8zCLvD4k2wgobHi1ESn0kFQeEfdr2ad/swgZVcq0BVqzVtToUB8cZLK7\nYcdC9qcC9Gso6uMNj/SsO1M4WHi1E65WOdrfGt/QTDwGiBf3HQxYGYAKm9En\n+vknqKdTMsd8aqcOx2hYjW0Ud/s5dHVds/siYPGYrOmVhWICDXdbwPXnDYaW\nqB5YaQszJIdxFpt4gOP1g2cV6/Egb8R31qZMTvXdXyTfqrLFkT8MqAzEEk76\nI/pf\r\n=fEEI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC2IdZzwfHwLgGqg+znz2NBXAVYhbBh3d2/MpJavWomFAIhAP6XDOfLrjTcYK4+SAjqkxr8XAB1QeaOVxWsk4NzIoZl"}]},"maintainers":[{"name":"cablanchard","email":"cablanchard@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/koelle-sort_0.1.0_1530485466643_0.9179530201484503"},"_hasShrinkwrap":false}},"time":{"created":"2018-07-01T22:51:06.244Z","0.1.0":"2018-07-01T22:51:06.802Z","modified":"2022-04-04T21:28:09.609Z"},"maintainers":[{"name":"cablanchard","email":"cablanchard@gmail.com"}],"description":"koelle-sort - also known as alphanum sort","homepage":"https://github.com/cblanc/koelle-sort#readme","repository":{"type":"git","url":"git+ssh://git@github.com/cblanc/koelle-sort.git"},"author":{"name":"cblanc"},"bugs":{"url":"https://github.com/cblanc/koelle-sort/issues"},"license":"MIT","readme":"[![CircleCI](https://circleci.com/gh/cblanc/koelle-sort.svg?style=svg)](https://circleci.com/gh/cblanc/koelle-sort) [![Coverage Status](https://coveralls.io/repos/github/cblanc/koelle-sort/badge.svg?branch=master)](https://coveralls.io/github/cblanc/koelle-sort?branch=master) [![Greenkeeper badge](https://badges.greenkeeper.io/cblanc/koelle-sort.svg)](https://greenkeeper.io/)\r\n\r\n# Koelle Sort\r\n\r\nAlso known as alphanum sort\r\n\r\nalphanum sort is designed to produce more sensible results than ascii sort for certain use cases\r\n\r\n| ASCII Sort | Koelle's Alphanum Sort |\r\n|:-----------|:-----------------------|\r\n| z1.doc     | z1.doc                 |\r\n| z10.doc    | z2.doc                 |\r\n| z100.doc   | z3.doc                 |\r\n| z101.doc   | z4.doc                 |\r\n| z102.doc   | z5.doc                 |\r\n| z11.doc    | z6.doc                 |\r\n| z12.doc    | z7.doc                 |\r\n| z13.doc    | z8.doc                 |\r\n| z14.doc    | z9.doc                 |\r\n| z15.doc    | z10.doc                |\r\n| z16.doc    | z11.doc                |\r\n| z17.doc    | z12.doc                |\r\n| z18.doc    | z13.doc                |\r\n| z19.doc    | z14.doc                |\r\n| z2.doc     | z15.doc                |\r\n| z20.doc    | z16.doc                |\r\n| z3.doc     | z17.doc                |\r\n| z4.doc     | z18.doc                |\r\n| z5.doc     | z19.doc                |\r\n| z6.doc     | z20.doc                |\r\n| z7.doc     | z100.doc               |\r\n| z8.doc     | z101.doc               |\r\n| z9.doc     | z102.doc               |\r\n\r\n## Behaviour\r\n\r\n- [Sorts alphanumeric strings](tests/sort.unit.ts#L21)\r\n- [Sorts numbers](tests/sort.unit.ts#L13)\r\n- [Sorts letters](tests/sort.unit.ts#L17)\r\n- [Sorts a number of different date formats](tests/sort.unit.ts#L25)\r\n- [Sorts decimal numbers](tests/sort.unit.ts#L41)\r\n- [Sorts zero padded numbers](tests/sort.unit.ts#L45)\r\n- [Sorts simple and complex filenames](tests/sort.unit.ts#L49)\r\n- [Sorts empty strings](tests/sort.unit.ts#L57)\r\n- [Sorts by number first](tests/sort.unit.ts#L61)\r\n\r\n### [Notable Unsupported Behaviour](tests/sort.unit.ts#L65)\r\n\r\n- Does not skip whitespace\r\n- Does not support numbers separated by multiple decimal points (e.g. IP Address, Semver formatting)\r\n\r\n## Usage\r\n\r\n```\r\nnpm install @cablanchard/koelle-sort\r\n```\r\n\r\n```javascript\r\nconst { alphanum } = require(\"@cablanchard/koelle-sort\");\r\n\r\nconst sorted = [\r\n\t\"file10.txt\",\r\n\t\"file1.txt\",\r\n\t\"file2.txt\",\r\n].sort(alphanum);\r\n\r\n/**\r\n * [\r\n * \"file1.txt\",\r\n * \"file2.txt\",\r\n * \"file10.txt\",\r\n * ]\r\n */\r\n```\r\n\r\n## License\r\n\r\nBased on the alphanum algorithm developed by [Dave Koelle](http://www.davekoelle.com/)\r\n\r\nThis implementation is MIT licensed\r\n","readmeFilename":"README.md"}