# deep-sort-object

> Sorts object by its keys

Latest version **1.0.2** (published 2017-04-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install deep-sort-object
pnpm add deep-sort-object
yarn add deep-sort-object
bun add deep-sort-object
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2017-04-03 |
| First published | 2014-05-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 21 |
| Author | IndigoUnited |
| Maintainers | satazor |
| Keywords | sort, deep, object, key, value, keys, values |

## Links

- npm: https://www.npmjs.com/package/deep-sort-object
- Repository: https://github.com/IndigoUnited/js-deep-sort-object
- Homepage: https://github.com/IndigoUnited/js-deep-sort-object#readme
- Issues: https://github.com/IndigoUnited/js-deep-sort-object/issues/
- npm.io page: https://npm.io/package/deep-sort-object

## Dependencies (1)

- [is-plain-object](https://npm.io/package/is-plain-object.md) ^2.0.1

## Recent versions

- 1.0.2 (latest) — 2017-04-03
- 1.0.1 — 2016-01-02
- 1.0.0 — 2016-01-02
- 0.1.1 — 2014-05-28
- 0.1.0 — 2014-05-28

## README

# deep-sort-object

[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url]

[npm-url]:https://npmjs.org/package/deep-sort-object
[downloads-image]:http://img.shields.io/npm/dm/deep-sort-object.svg
[npm-image]:http://img.shields.io/npm/v/deep-sort-object.svg
[travis-url]:https://travis-ci.org/IndigoUnited/js-deep-sort-object
[travis-image]:http://img.shields.io/travis/IndigoUnited/js-deep-sort-object/master.svg
[david-dm-url]:https://david-dm.org/IndigoUnited/js-deep-sort-object
[david-dm-image]:https://img.shields.io/david/IndigoUnited/js-deep-sort-object.svg
[david-dm-dev-url]:https://david-dm.org/IndigoUnited/js-deep-sort-object#info=devDependencies
[david-dm-dev-image]:https://img.shields.io/david/dev/IndigoUnited/js-deep-sort-object.svg

Simple module to sort objects recursively by its keys.


## Installation

`$ npm install deep-sort-object` - `NPM`   
`$ bower install deep-sort-object` - `bower`

The browser file is named `index.umd.js` which supports CommonJS, AMD and globals (`deepForEach`).
If you want to run this module on old browsers, you must include [es5-shim](https://github.com/es-shims/es5-shim).


## Usage

The example bellow is based on `nodejs`.

```js
var sortobject = require('deep-sort-object');

sortobject({
    'z': 'foo',
    'b': 'bar',
    'a': [
        {
            'z': 'foo',
            'b': 'bar'
        }
    ]
});

/*
{
    'a': [
        {
            'b': 'bar',
            'z': 'foo'
        }
    ],
    'b': 'bar',
    'z': 'foo'
});
*/
```


## Tests

`$ npm test`


## License

Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php).

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