{"_id":"@dasilvacontin/human-sort","_rev":"4-86135dbb78970bb0f76f926004282746","name":"@dasilvacontin/human-sort","description":"Sort an array using your judgement as a comparator.","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@dasilvacontin/human-sort","version":"1.0.0","description":"Sort an array using your judgement as a comparator.","main":"lib/index.js","bin":{"human-sort":"./bin/human-sort.js"},"scripts":{"lint":"eslint src","typecheck":"flow","pretest":"npm run lint && npm run typecheck","test":"mocha --compilers js:babel-register","coverage":"istanbul cover node_modules/mocha/bin/_mocha -- --compilers js:babel-register","ci":"dot-only-hunter && npm run coverage && cat ./coverage/lcov.info | coveralls","build":"babel src --out-dir .","prepublish":"npm run build"},"author":{"name":"David da Silva","email":"dasilvacontin@gmail.com"},"license":"MIT","dependencies":{"bluebird":"^3.3.5","lodash":"^4.11.1"},"devDependencies":{"babel-cli":"^6.7.5","babel-eslint":"^6.0.2","babel-plugin-lodash":"^2.3.0","babel-plugin-syntax-flow":"^6.5.0","babel-plugin-transform-flow-strip-types":"^6.7.0","babel-plugin-transform-runtime":"^6.7.5","babel-plugin-typecheck":"^3.8.0","babel-polyfill":"^6.7.4","babel-preset-es2015":"^6.6.0","babel-preset-stage-0":"^6.5.0","babel-register":"^6.7.2","babel-runtime":"^6.6.1","coveralls":"^2.11.9","dot-only-hunter":"^1.0.2","eslint":"^2.8.0","eslint-config-standard":"^5.1.0","eslint-plugin-flow-vars":"^0.3.0","eslint-plugin-promise":"^1.1.0","eslint-plugin-standard":"^1.3.2","flow-bin":"^0.23.0","istanbul":"^1.0.0-alpha.2","mocha":"^2.4.5","unexpected":"^10.13.0"},"gitHead":"1d67a8d24d6e3867960dc4f10ee6777d9ace0b12","_id":"@dasilvacontin/human-sort@1.0.0","_shasum":"f9f0d0af0e022e704ce29a3298b55214c5bcbccf","_from":".","_npmVersion":"3.8.3","_nodeVersion":"5.10.1","_npmUser":{"name":"dasilvacontin","email":"dasilvacontin@gmail.com"},"dist":{"shasum":"f9f0d0af0e022e704ce29a3298b55214c5bcbccf","tarball":"https://registry.npmjs.org/@dasilvacontin/human-sort/-/human-sort-1.0.0.tgz","integrity":"sha512-+4CyUw2XYUn+qwIrHq13zPiHFxsWMbSiG3LkfFcuEoQFjTcXoTK8cbwVruYMbCfI89hdxUVIH3eTBsDb1CHNEQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDTzxgtJECrRpwaRLow6EXqvUS80eRYVBTJ1fw3WDAWyQIgcBpQuf200anCCP3lx+l7kRxzhCiUlfXpvl+06iqRh9w="}]},"maintainers":[{"name":"dasilvacontin","email":"dasilvacontin@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/human-sort-1.0.0.tgz_1461169532870_0.4335733496118337"}},"1.0.1":{"name":"@dasilvacontin/human-sort","version":"1.0.1","description":"Sort an array using your judgement as a comparator.","main":"lib/index.js","bin":{"human-sort":"./bin/human-sort.js"},"scripts":{"lint":"eslint src","typecheck":"flow","pretest":"npm run lint && npm run typecheck","test":"mocha --compilers js:babel-register","coverage":"istanbul cover node_modules/mocha/bin/_mocha -- --compilers js:babel-register","ci":"dot-only-hunter && npm run coverage && cat ./coverage/lcov.info | coveralls","build":"babel src --out-dir .","prepublish":"npm run build"},"author":{"name":"David da Silva","email":"dasilvacontin@gmail.com"},"license":"MIT","dependencies":{"bluebird":"^3.3.5","lodash":"^4.11.1"},"devDependencies":{"babel-cli":"^6.7.5","babel-eslint":"^6.0.2","babel-plugin-lodash":"^2.3.0","babel-plugin-syntax-flow":"^6.5.0","babel-plugin-transform-flow-strip-types":"^6.7.0","babel-plugin-transform-runtime":"^6.7.5","babel-plugin-typecheck":"^3.8.0","babel-polyfill":"^6.7.4","babel-preset-es2015":"^6.6.0","babel-preset-stage-0":"^6.5.0","babel-register":"^6.7.2","babel-runtime":"^6.6.1","coveralls":"^2.11.9","dot-only-hunter":"^1.0.2","eslint":"^2.8.0","eslint-config-standard":"^5.1.0","eslint-plugin-flow-vars":"^0.3.0","eslint-plugin-promise":"^1.1.0","eslint-plugin-standard":"^1.3.2","flow-bin":"^0.23.0","istanbul":"^1.0.0-alpha.2","mocha":"^2.4.5","unexpected":"^10.13.0"},"gitHead":"90812ab47472c6ae2ddc53b3580280991f418424","_id":"@dasilvacontin/human-sort@1.0.1","_shasum":"30d2b2239453ee67926c5fe2f48b6b5cdf14ceba","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.0.0","_npmUser":{"name":"dasilvacontin","email":"dasilvacontin@gmail.com"},"dist":{"shasum":"30d2b2239453ee67926c5fe2f48b6b5cdf14ceba","tarball":"https://registry.npmjs.org/@dasilvacontin/human-sort/-/human-sort-1.0.1.tgz","integrity":"sha512-OiJQF/kJvIFUivcz5m2nzavDtLCUTiIh9jQ7wqIKrbeOiOD+NsbR+3JIz47PG4KEiXh/95zi6N64ZY6UfP+jig==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHLLvxIZrVzJYIaBvx9x8hbX1Lq/ZbcyG2YlaD7XUVocAiEAiVe6LjQfwNGYqaHxn7Vrt/ExJkM9Bd1EWFmfh1/1oU4="}]},"maintainers":[{"name":"dasilvacontin","email":"dasilvacontin@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/human-sort-1.0.1.tgz_1464190222568_0.6143438413273543"}}},"readme":"human-sort\n==============\n\n[![Build Status](https://travis-ci.org/dasilvacontin/human-sort.svg?branch=master)](https://travis-ci.org/dasilvacontin/human-sort)\n[![Coverage Status](https://coveralls.io/repos/github/dasilvacontin/human-sort/badge.svg?branch=master)](https://coveralls.io/github/dasilvacontin/human-sort?branch=master)\n\nEver wanted to sort your tees by coolness? By I'd-rather-wear-this-one order? Or perhaps you want to know which are your top emojis? #firstworldproblems\n\nCLI to the power! Sort an array using your judgement as a comparator.\n\n\n## CLI usage\n\n```\nusage: human-sort <source file> [max size] [output file]\n\n    <source file>  A JSON file containing the array you'd like to sort.\n\n       [max size]  The maximum size of the resulting sorted array. Makes\n                   sorting faster, since you only care about the top X results.\n                   Use -1 for Infinity.\n\n    [output file]  Optional target file where to store the results.\n\n```\n\n\n## Demo\n\n```\n➜  human-sort git:(master) ✗ human-sort test/input.json 3 output.json\n# HUMAN-SORT\n\nPerforming human-sort on 9 elements!\nwith resulting sorted array of max size 3!\n\n\n## ROUND 1\n\nSource array: [ '😁', '😂', '😃', '😄', '😅', '😆', '😇' ]\nSorted array: [ '😊' ] (max size: 3)\nCurrently inserting: 😉\n\nShowdown!\nA) 😉\nB) 😊\nWhich one, human?\n> b\nYou chose B.\n\n\n## ROUND 2\n\nSource array: [ '😁', '😂', '😃', '😄', '😅', '😆' ]\nSorted array: [ '😊', '😉' ] (max size: 3)\nCurrently inserting: 😇\n\nShowdown!\nA) 😇\nB) 😊\nWhich one, human?\n> b\nYou chose B.\n\nShowdown!\nA) 😇\nB) 😉\nWhich one, human?\n> a\nYou chose A.\n\n\n## ROUND 3\n\nSource array: [ '😁', '😂', '😃', '😄', '😅' ]\nSorted array: [ '😊', '😇', '😉' ] (max size: 3)\nCurrently inserting: 😆\n\nShowdown!\nA) 😆\nB) 😊\nWhich one, human?\n> a\nYou chose A.\n\n\n## ROUND 4\n\nSource array: [ '😁', '😂', '😃', '😄' ]\nSorted array: [ '😆', '😊', '😇' ] (max size: 3)\nCurrently inserting: 😅\n\nShowdown!\nA) 😅\nB) 😆\nWhich one, human?\n> a\nYou chose A.\n\n\n## ROUND 5\n\nSource array: [ '😁', '😂', '😃' ]\nSorted array: [ '😅', '😆', '😊' ] (max size: 3)\nCurrently inserting: 😄\n\nShowdown!\nA) 😄\nB) 😅\nWhich one, human?\n> b\nYou chose B.\n\nShowdown!\nA) 😄\nB) 😆\nWhich one, human?\n> b\nYou chose B.\n\nShowdown!\nA) 😄\nB) 😊\nWhich one, human?\n> b\nYou chose B.\n\n\n## ROUND 6\n\nSource array: [ '😁', '😂' ]\nSorted array: [ '😅', '😆', '😊' ] (max size: 3)\nCurrently inserting: 😃\n\nShowdown!\nA) 😃\nB) 😅\nWhich one, human?\n> b\nYou chose B.\n\nShowdown!\nA) 😃\nB) 😆\nWhich one, human?\n> b\nYou chose B.\n\nShowdown!\nA) 😃\nB) 😊\nWhich one, human?\n> b\nYou chose B.\n\n\n## ROUND 7\n\nSource array: [ '😁' ]\nSorted array: [ '😅', '😆', '😊' ] (max size: 3)\nCurrently inserting: 😂\n\nShowdown!\nA) 😂\nB) 😅\nWhich one, human?\n> b\nYou chose B.\n\nShowdown!\nA) 😂\nB) 😆\nWhich one, human?\n> a\nYou chose A.\n\n\n## ROUND 8\n\nSource array: []\nSorted array: [ '😅', '😂', '😆' ] (max size: 3)\nCurrently inserting: 😁\n\nShowdown!\nA) 😁\nB) 😅\nWhich one, human?\n> b\nYou chose B.\n\nShowdown!\nA) 😁\nB) 😂\nWhich one, human?\n> b\nYou chose B.\n\nShowdown!\nA) 😁\nB) 😆\nWhich one, human?\n> a\nYou chose A.\n\nFinal sorted array:\n[ '😅', '😂', '😁' ]\n\n➜  human-sort git:(master) ✗ cat output.json\n[\"😅\",\"😂\",\"😁\"]%\n```\n\n## License\n\nMIT © [David da Silva]\n\n[Babel]: http://babeljs.io/\n[Flow]: http://flowtype.org/\n[Eslint]: http://eslint.org/\n[standard]: https://github.com/feross/standard\n[Mocha]: http://mochajs.org/\n[Unexpected]: http://unexpected.js.org/\n[Istanbul]: https://github.com/gotwarlost/istanbul\n[dot-only-hunter]: https://github.com/dasilvacontin/dot-only-hunter\n[TravisCI]: https://travis-ci.org\n[Coveralls]: https://coveralls.io/\n[@jvlucic]: https://github.com/jvlucic\n[David da Silva]: https://dasilvacont.in\n","maintainers":[{"name":"dasilvacontin","email":"dasilvacontin@gmail.com"}],"time":{"modified":"2022-06-12T16:52:47.133Z","created":"2016-04-20T16:25:35.158Z","1.0.0":"2016-04-20T16:25:35.158Z","1.0.1":"2016-05-25T15:30:25.061Z"},"author":{"name":"David da Silva","email":"dasilvacontin@gmail.com"},"license":"MIT","readmeFilename":"README.md"}