forked from lix-project/lix-website
.. | ||
node_modules/sort-keys | ||
index.js | ||
LICENSE.md | ||
package.json | ||
README.md |
sort-keys-length ![Build Status](http://img.shields.io/travis/kevva/sort-keys-length/master.svg?style=flat)
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