{"_id":"sort-on","_rev":"2763919","name":"sort-on","description":"Sort an array on an object property","dist-tags":{"latest":"5.0.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2022-02-14T08:03:38.000Z","created":"2015-01-08T06:26:34.865Z","5.0.0":"2021-11-17T18:50:10.040Z","4.1.1":"2021-06-01T11:45:14.594Z","4.1.0":"2019-07-30T22:38:05.515Z","4.0.0":"2019-05-21T07:40:47.361Z","3.0.0":"2018-01-21T02:38:06.923Z","2.0.0":"2017-03-20T03:32:43.035Z","1.3.0":"2016-05-01T15:59:30.731Z","1.2.2":"2015-06-13T12:08:00.452Z","1.2.1":"2015-06-12T22:02:18.962Z","1.2.0":"2015-05-02T14:18:26.937Z","1.1.0":"2015-04-10T02:37:41.338Z","1.0.2":"2015-02-20T03:26:33.775Z","1.0.1":"2015-01-17T20:14:58.724Z","1.0.0":"2015-01-08T06:26:34.865Z"},"users":{},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/sort-on.git"},"versions":{"5.0.0":{"name":"sort-on","version":"5.0.0","description":"Sort an array on an object property","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/sort-on.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"xo && ava && tsd"},"keywords":["sort","sorting","array","by","object","property","dot","path","get"],"dependencies":{"dot-prop":"^6.0.1"},"devDependencies":{"ava":"^3.15.0","tsd":"^0.18.0","xo":"^0.46.4"},"types":"./index.d.ts","gitHead":"70c116b819ea6a8d25767405364cf8fb7b78e41e","bugs":{"url":"https://github.com/sindresorhus/sort-on/issues"},"homepage":"https://github.com/sindresorhus/sort-on#readme","_id":"sort-on@5.0.0","_nodeVersion":"12.22.1","_npmVersion":"8.1.0","dist":{"shasum":"86598da8d030a385b663a2862a884f2882ab4037","size":2190,"noattachment":false,"key":"/sort-on/-/sort-on-5.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/sort-on/download/sort-on-5.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sort-on_5.0.0_1637175009897_0.7901348722785708"},"_hasShrinkwrap":false,"publish_time":1637175010040,"_cnpm_publish_time":1637175010040,"_cnpmcore_publish_time":"2021-12-16T23:13:32.474Z"},"4.1.1":{"name":"sort-on","version":"4.1.1","description":"Sort an array on an object property","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/sort-on.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["sort","sorting","array","by","object","property","dot","path","get"],"dependencies":{"arrify":"^2.0.1","dot-prop":"^5.0.0"},"devDependencies":{"ava":"^1.4.1","tsd":"^0.7.4","xo":"^0.24.0"},"gitHead":"5cef612ff98d12055c6bdd12c91d673675d4aac4","bugs":{"url":"https://github.com/sindresorhus/sort-on/issues"},"homepage":"https://github.com/sindresorhus/sort-on#readme","_id":"sort-on@4.1.1","_nodeVersion":"16.0.0","_npmVersion":"7.10.0","dist":{"shasum":"8b4147f5a7ef43861dc2fe5ef090064df4c7bc3c","size":2191,"noattachment":false,"key":"/sort-on/-/sort-on-4.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/sort-on/download/sort-on-4.1.1.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sort-on_4.1.1_1622547914454_0.8303400631652742"},"_hasShrinkwrap":false,"publish_time":1622547914594,"_cnpm_publish_time":1622547914594,"_cnpmcore_publish_time":"2021-12-16T23:13:32.687Z"},"4.1.0":{"name":"sort-on","version":"4.1.0","description":"Sort an array on an object property","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/sort-on.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["sort","sorting","array","by","object","property","dot","path","get"],"dependencies":{"arrify":"^2.0.1","dot-prop":"^5.0.0"},"devDependencies":{"ava":"^1.4.1","tsd":"^0.7.4","xo":"^0.24.0"},"gitHead":"52d358864ae7c7661bd199c41e4b465070cb1430","bugs":{"url":"https://github.com/sindresorhus/sort-on/issues"},"homepage":"https://github.com/sindresorhus/sort-on#readme","_id":"sort-on@4.1.0","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"939e671a35eddcf8b6c64fc3cbbdf2119f8e23f6","size":2256,"noattachment":false,"key":"/sort-on/-/sort-on-4.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/sort-on/download/sort-on-4.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sort-on_4.1.0_1564526285376_0.3094229661018981"},"_hasShrinkwrap":false,"publish_time":1564526285515,"_cnpm_publish_time":1564526285515,"_cnpmcore_publish_time":"2021-12-16T23:13:32.891Z"},"4.0.0":{"name":"sort-on","version":"4.0.0","description":"Sort an array on an object property","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/sort-on.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava"},"keywords":["sort","sorting","array","by","object","property","dot","path","get"],"dependencies":{"arrify":"^2.0.1","dot-prop":"^5.0.0"},"devDependencies":{"ava":"^1.4.1","xo":"^0.24.0"},"gitHead":"bc505bcb2903e6e9646352908116df87110c60c7","bugs":{"url":"https://github.com/sindresorhus/sort-on/issues"},"homepage":"https://github.com/sindresorhus/sort-on#readme","_id":"sort-on@4.0.0","_nodeVersion":"8.16.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"1d846aaeba2cdb5041aabec9180d8e34f52cfbbf","size":2050,"noattachment":false,"key":"/sort-on/-/sort-on-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/sort-on/download/sort-on-4.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sort-on_4.0.0_1558424447208_0.2103025922319013"},"_hasShrinkwrap":false,"publish_time":1558424447361,"_cnpm_publish_time":1558424447361,"_cnpmcore_publish_time":"2021-12-16T23:13:33.097Z"},"3.0.0":{"name":"sort-on","version":"3.0.0","description":"Sort an array on an object property","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/sort-on.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["sort","sorting","array","arr","by","obj","object","prop","property","dot","path","get"],"dependencies":{"arrify":"^1.0.0","dot-prop":"^4.1.1"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"92772a52c224483f183ec2d569309d55673a7b53","bugs":{"url":"https://github.com/sindresorhus/sort-on/issues"},"homepage":"https://github.com/sindresorhus/sort-on#readme","_id":"sort-on@3.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"8094005281bf450e91ac4cb4c4cf00c3d6569c41","size":2022,"noattachment":false,"key":"/sort-on/-/sort-on-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/sort-on/download/sort-on-3.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sort-on-3.0.0.tgz_1516502285922_0.4185189900454134"},"directories":{},"publish_time":1516502286923,"_hasShrinkwrap":false,"_cnpm_publish_time":1516502286923,"_cnpmcore_publish_time":"2021-12-16T23:13:33.333Z"},"2.0.0":{"name":"sort-on","version":"2.0.0","description":"Sort an array on an object property","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/sort-on.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["sort","sorting","array","arr","by","obj","object","prop","property","dot","path","get"],"dependencies":{"arrify":"^1.0.0","dot-prop":"^4.1.1"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"ad39c70bdb51c3eab86695b46f6dd347608298a2","bugs":{"url":"https://github.com/sindresorhus/sort-on/issues"},"homepage":"https://github.com/sindresorhus/sort-on#readme","_id":"sort-on@2.0.0","_shasum":"0df42a679d7ae4aed9c30ba2f55807d979910fcc","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.7.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"0df42a679d7ae4aed9c30ba2f55807d979910fcc","size":2057,"noattachment":false,"key":"/sort-on/-/sort-on-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/sort-on/download/sort-on-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/sort-on-2.0.0.tgz_1489980762779_0.5397795988246799"},"directories":{},"publish_time":1489980763035,"_hasShrinkwrap":false,"_cnpm_publish_time":1489980763035,"_cnpmcore_publish_time":"2021-12-16T23:13:33.566Z"},"1.3.0":{"name":"sort-on","version":"1.3.0","description":"Sort an array on an object property","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/sort-on.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"ava"},"files":["index.js"],"keywords":["sort","sorting","array","arr","by","obj","object","prop","property","dot","path","get"],"dependencies":{"arrify":"^1.0.0","dot-prop":"^2.0.0"},"devDependencies":{"ava":"*"},"gitHead":"748ee63ed0242c037511ee99ea451eff82263572","bugs":{"url":"https://github.com/sindresorhus/sort-on/issues"},"homepage":"https://github.com/sindresorhus/sort-on#readme","_id":"sort-on@1.3.0","_shasum":"0dfd5b364b23df7f2acd86985daeb889e1a7c840","_from":".","_npmVersion":"3.8.9","_nodeVersion":"4.4.2","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"0dfd5b364b23df7f2acd86985daeb889e1a7c840","size":2036,"noattachment":false,"key":"/sort-on/-/sort-on-1.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/sort-on/download/sort-on-1.3.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/sort-on-1.3.0.tgz_1462118370290_0.6632615383714437"},"directories":{},"publish_time":1462118370731,"_hasShrinkwrap":false,"_cnpm_publish_time":1462118370731,"_cnpmcore_publish_time":"2021-12-16T23:13:33.776Z"},"1.2.2":{"name":"sort-on","version":"1.2.2","description":"Sort an array on an object property","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/sort-on"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js"],"keywords":["sort","sorting","array","arr","by","obj","object","prop","property","dot","path","get"],"dependencies":{"arrify":"^1.0.0","dot-prop":"^2.0.0"},"devDependencies":{"ava":"0.0.4"},"gitHead":"7f769f375e029eb90deb8955786d53d5bc42abe8","bugs":{"url":"https://github.com/sindresorhus/sort-on/issues"},"homepage":"https://github.com/sindresorhus/sort-on","_id":"sort-on@1.2.2","_shasum":"5d19fe5637602b07f06af5fc9ac3f8d9ff359ceb","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"5d19fe5637602b07f06af5fc9ac3f8d9ff359ceb","size":1939,"noattachment":false,"key":"/sort-on/-/sort-on-1.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/sort-on/download/sort-on-1.2.2.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1434197280452,"_hasShrinkwrap":false,"_cnpm_publish_time":1434197280452,"_cnpmcore_publish_time":"2021-12-16T23:13:33.961Z"},"1.2.1":{"name":"sort-on","version":"1.2.1","description":"Sort an array on an object property","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/sort-on"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js"],"keywords":["sort","sorting","array","arr","by","obj","object","prop","property","dot","path","get"],"dependencies":{"dot-prop":"^2.0.0"},"devDependencies":{"ava":"0.0.4"},"gitHead":"63ccc6d71aa985ff72f5f1f907cbdce8eb81b234","bugs":{"url":"https://github.com/sindresorhus/sort-on/issues"},"homepage":"https://github.com/sindresorhus/sort-on","_id":"sort-on@1.2.1","_shasum":"8709411dec9cfa782c065950baae5c8b21657cab","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"8709411dec9cfa782c065950baae5c8b21657cab","size":1934,"noattachment":false,"key":"/sort-on/-/sort-on-1.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/sort-on/download/sort-on-1.2.1.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1434146538962,"_hasShrinkwrap":false,"_cnpm_publish_time":1434146538962,"_cnpmcore_publish_time":"2021-12-16T23:13:34.217Z"},"1.2.0":{"name":"sort-on","version":"1.2.0","description":"Sort an array on an object property","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/sort-on"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js"],"keywords":["sort","sorting","array","arr","by","obj","object","prop","property","dot","path","get"],"dependencies":{"dot-prop":"^2.0.0"},"devDependencies":{"ava":"0.0.4"},"gitHead":"012e6c0f3bfe2d3d5f5942a9c5349aabc5fe50d2","bugs":{"url":"https://github.com/sindresorhus/sort-on/issues"},"homepage":"https://github.com/sindresorhus/sort-on","_id":"sort-on@1.2.0","_shasum":"62b342b09a69ddccd64702e1345929209bc04ffd","_from":".","_npmVersion":"2.7.4","_nodeVersion":"0.12.2","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"62b342b09a69ddccd64702e1345929209bc04ffd","size":1882,"noattachment":false,"key":"/sort-on/-/sort-on-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/sort-on/download/sort-on-1.2.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1430576306937,"_hasShrinkwrap":false,"_cnpm_publish_time":1430576306937,"_cnpmcore_publish_time":"2021-12-16T23:13:34.431Z"},"1.1.0":{"name":"sort-on","version":"1.1.0","description":"Sort an array on an object property","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/sort-on"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js"],"keywords":["sort","sorting","array","arr","by","obj","object","prop","property","dot","path","get"],"dependencies":{"dot-prop":"^1.0.0"},"devDependencies":{"ava":"0.0.4"},"gitHead":"608dbbb2f203df09880b5f081c0c5a196f4963e1","bugs":{"url":"https://github.com/sindresorhus/sort-on/issues"},"homepage":"https://github.com/sindresorhus/sort-on","_id":"sort-on@1.1.0","_shasum":"cc5bb84ecf129327fd7a1726c92c67b0ebd33a4f","_from":".","_npmVersion":"2.7.4","_nodeVersion":"0.12.2","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"cc5bb84ecf129327fd7a1726c92c67b0ebd33a4f","size":1869,"noattachment":false,"key":"/sort-on/-/sort-on-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/sort-on/download/sort-on-1.1.0.tgz"},"directories":{},"publish_time":1428633461338,"_hasShrinkwrap":false,"_cnpm_publish_time":1428633461338,"_cnpmcore_publish_time":"2021-12-16T23:13:34.668Z"},"1.0.2":{"name":"sort-on","version":"1.0.2","description":"Sort an array on an object property","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/sort-on"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js"],"keywords":["sort","sorting","array","arr","by","obj","object","prop","property","dot","path","get"],"dependencies":{"dot-prop":"^1.0.0"},"devDependencies":{"ava":"0.0.4"},"gitHead":"94684d7150cc3b11f4b0c06d952f0f1c3762c978","bugs":{"url":"https://github.com/sindresorhus/sort-on/issues"},"homepage":"https://github.com/sindresorhus/sort-on","_id":"sort-on@1.0.2","_shasum":"6873099bee6f53d39e24019fb96890848ef04335","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"6873099bee6f53d39e24019fb96890848ef04335","size":1188,"noattachment":false,"key":"/sort-on/-/sort-on-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/sort-on/download/sort-on-1.0.2.tgz"},"directories":{},"publish_time":1424402793775,"_hasShrinkwrap":false,"_cnpm_publish_time":1424402793775,"_cnpmcore_publish_time":"2021-12-16T23:13:34.878Z"},"1.0.1":{"name":"sort-on","version":"1.0.1","description":"Sort an array on an object property","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/sort-on"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js"],"keywords":["sort","sorting","array","arr","by","obj","object","prop","property","dot","path","get"],"dependencies":{"dot-prop":"^1.0.0"},"devDependencies":{"ava":"0.0.4"},"gitHead":"3dda17cd8bd8a5fbccda9634b36cf4f641c49dd4","bugs":{"url":"https://github.com/sindresorhus/sort-on/issues"},"homepage":"https://github.com/sindresorhus/sort-on","_id":"sort-on@1.0.1","_shasum":"57aea1f05bf6f0127f212704aa85b3852125e8d9","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"57aea1f05bf6f0127f212704aa85b3852125e8d9","size":1188,"noattachment":false,"key":"/sort-on/-/sort-on-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/sort-on/download/sort-on-1.0.1.tgz"},"directories":{},"publish_time":1421525698724,"_hasShrinkwrap":false,"_cnpm_publish_time":1421525698724,"_cnpmcore_publish_time":"2021-12-16T23:13:35.092Z"},"1.0.0":{"name":"sort-on","version":"1.0.0","description":"Sort an array on an object property","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/sort-on"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js"],"keywords":["sort","sorting","array","arr","by","obj","object","prop","property","dot","path","get"],"dependencies":{"dot-prop":"^1.0.0"},"devDependencies":{"ava":"0.0.4"},"gitHead":"2ef0c202e5f66f750042d004bfd6d73cbec3ddd9","bugs":{"url":"https://github.com/sindresorhus/sort-on/issues"},"homepage":"https://github.com/sindresorhus/sort-on","_id":"sort-on@1.0.0","_shasum":"f9ea6f61e8cd18bcae351dddfff185d082210317","_from":".","_npmVersion":"2.1.16","_nodeVersion":"0.10.32","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"f9ea6f61e8cd18bcae351dddfff185d082210317","size":1858,"noattachment":false,"key":"/sort-on/-/sort-on-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/sort-on/download/sort-on-1.0.0.tgz"},"directories":{},"publish_time":1420698394865,"_hasShrinkwrap":false,"_cnpm_publish_time":1420698394865,"_cnpmcore_publish_time":"2021-12-16T23:13:35.278Z"}},"readme":"# sort-on\n\n> Sort an array on an object property\n\n## Install\n\n```sh\nnpm install sort-on\n```\n\n## Usage\n\n```js\nimport sortOn from 'sort-on';\n\n// Sort by an object property\nsortOn([{x: 'b'}, {x: 'a'}, {x: 'c'}], 'x');\n//=> [{x: 'a'}, {x: 'b'}, {x: 'c'}]\n\n// Sort descending by an object property\nsortOn([{x: 'b'}, {x: 'a'}, {x: 'c'}], '-x');\n//=> [{x: 'c'}, {x: 'b'}, {x: 'a'}]\n\n// Sort by a nested object property\nsortOn([{x: {y: 'b'}}, {x: {y: 'a'}}], 'x.y');\n//=> [{x: {y: 'a'}}, {x: {y: 'b'}}]\n\n// Sort descending by a nested object property\nsortOn([{x: {y: 'b'}}, {x: {y: 'a'}}], '-x.y');\n//=> [{x: {y: 'b'}, {x: {y: 'a'}}}]\n\n// Sort by the `x` property, then `y`\nsortOn([{x: 'c', y: 'c'}, {x: 'b', y: 'a'}, {x: 'b', y: 'b'}], ['x', 'y']);\n//=> [{x: 'b', y: 'a'}, {x: 'b', y: 'b'}, {x: 'c', y: 'c'}]\n\n// Sort by the returned value\nsortOn([{x: 'b'}, {x: 'a'}, {x: 'c'}], element => element.x);\n//=> [{x: 'a'}, {x: 'b'}, {x: 'c'}]\n```\n\n## API\n\n### sortOn(array, property)\n\nReturns a new sorted version of the given array.\n\n#### array\n\nType: `unknown[]`\n\nThe array to sort.\n\n#### property\n\nType: `string | string[] | Function`\n\nThe string can be a [dot path](https://github.com/sindresorhus/dot-prop) to a nested object property.\n\nPrefix it with `-` to sort it in descending order.\n","_attachments":{},"homepage":"https://github.com/sindresorhus/sort-on#readme","bugs":{"url":"https://github.com/sindresorhus/sort-on/issues"},"license":"MIT"}