diff options
Diffstat (limited to 'node_modules/sort-keys-length/README.md')
-rw-r--r-- | node_modules/sort-keys-length/README.md | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/node_modules/sort-keys-length/README.md b/node_modules/sort-keys-length/README.md new file mode 100644 index 0000000..1efe188 --- /dev/null +++ b/node_modules/sort-keys-length/README.md @@ -0,0 +1,35 @@ +# sort-keys-length [![Build Status](http://img.shields.io/travis/kevva/sort-keys-length/master.svg?style=flat)](http://travis-ci.org/kevva/sort-keys-length) + +> Sort object keys by length + +## Install + +```sh +$ npm install --save sort-keys-length +``` + +## Usage + +```js +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](https://github.com/kevva) |