sort-keys-length
Sort object keys by length
Install
$ npm install sort-keys-length
Usage
const sortKeysLength = ; sortKeysLength;//=> {a: 'y', ab: 'x', abc: 'z'} sortKeysLength;//=> {abc: 'z', ab: 'x', a: 'y'}
API
sortKeysLength.asc(object, [options])
Ascending sort.
sortKeysLength.desc(object, [options])
Descending sort.
object
Type: Object
Object to sort.
options
Type: Object
deep
Type: boolean
Default: false
Recursively sort keys.
License
MIT © Kevin Mårtensson