compound-sort

时间:2021-05-24 17:47:12
【文件属性】:
文件名称:compound-sort
文件大小:2KB
文件格式:ZIP
更新时间:2021-05-24 17:47:12
JavaScript 复合排序 从一个或多个比较器创建复合排序/比较器功能 例子 function cmpa ( a , b ) { return a . a < b . a ? - 1 : ( a . a === b . a ? 0 : 1 ) } function cmpb ( a , b ) { return a . b < b . b ? - 1 : ( a . b === b . b ? 0 : 1 ) } // // Returns a function that compares first by cmpa, then by cmpb // for values that tie with respect to cmpa // compound ( cmpa , cmpb )
【文件预览】:
compound-sort-master
----.gitignore(19B)
----README.md(402B)
----test()
--------test.js(592B)
----package.json(296B)
----index.js(252B)

网友评论