# sort-keys-length

> Sort objecy keys by length

Latest version **2.0.0** (published 2017-07-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install sort-keys-length
pnpm add sort-keys-length
yarn add sort-keys-length
bun add sort-keys-length
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2017-07-03 |
| First published | 2015-01-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/sort-keys-length) |
| Module format | CommonJS |
| Node | >=4 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11 |
| Author | Kevin Mårtensson |
| Maintainers | kevva |
| Keywords | length, object, sort |

## Links

- npm: https://www.npmjs.com/package/sort-keys-length
- Repository: https://github.com/kevva/sort-keys-length
- Homepage: https://github.com/kevva/sort-keys-length#readme
- Issues: https://github.com/kevva/sort-keys-length/issues
- npm.io page: https://npm.io/package/sort-keys-length

## Dependencies (2)

- [sort-keys](https://npm.io/package/sort-keys.md) ^2.0.0
- [length-sort](https://npm.io/package/length-sort.md) ^2.0.0

## Recent versions

- 2.0.0 (latest) — 2017-07-03
- 1.0.1 — 2015-01-22
- 1.0.0 — 2015-01-22

## README

# sort-keys-length [![Build Status](https://travis-ci.org/kevva/sort-keys-length.svg?branch=master)](http://travis-ci.org/kevva/sort-keys-length)

> Sort object keys by length


## Install

```
$ npm install sort-keys-length
```


## Usage

```js
const 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

### sortKeysLength.asc(object, [options])

Ascending sort.

### sortKeysLength.desc(object, [options])

Descending sort.

#### object

Type: `Object`

Object to sort.

#### options

Type: `Object`

##### deep

Type: `boolean`<br>
Default: `false`

Recursively sort keys.


## License

MIT © [Kevin Mårtensson](https://github.com/kevva)

---
_Source: https://npm.io/package/sort-keys-length · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
