mirror of
https://github.com/crazy-max/ghaction-upx.git
synced 2024-11-22 10:26:08 -07:00
624 B
624 B
sort-keys-length
Sort object keys by length
Install
$ npm install --save sort-keys-length
Usage
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' }
API
.asc
Ascending sort.
.desc
Descending sort.
License
MIT © Kevin Mårtensson