刘琳琳 97c35fdf0d 航汇HHArome小程序容器演示 | 2 months ago | |
---|---|---|
.. | ||
node_modules | 2 months ago | |
LICENSE.md | 2 months ago | |
README.md | 2 months ago | |
index.js | 2 months ago | |
package.json | 2 months ago |
Sort object keys by length
$ npm install --save sort-keys-length
var sortKeysLength = require('sort-keys-length');
sortKeysLength.asc({ ab: 'x', a: 'y', abc: 'z' });
//=> { a: 'y', ab: 'x', abc: 'z' }
sortKeysLength.desc({ ab: 'x', a: 'y', abc: 'z' });
//=> { abc: 'z', ab: 'x', a: 'y' }
Ascending sort.
Descending sort.
MIT © Kevin Mårtensson