Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

deep-sort-object

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deep-sort-object

Sorts object by its keys

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

deep-sort-object

NPM version Downloads Build Status Dependency status Dev Dependency status

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.

Usage

The example bellow is based on nodejs.

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.

Keywords

FAQs

Package last updated on 03 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc