All Projects → IndigoUnited → js-deep-sort-object

IndigoUnited / js-deep-sort-object

Licence: MIT license
Simple module to sort objects recursively by its keys

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to js-deep-sort-object

Moses
Utility library for functional programming in Lua
Stars: ✭ 541 (+2747.37%)
Mutual labels:  collection, object, array
Deep Object Diff
Deep diffs two objects, including nested structures of arrays and objects, and returns the difference. ❄️
Stars: ✭ 515 (+2610.53%)
Mutual labels:  object, array, deep
Get Value
Use property paths (`a.b.c`) get a nested value from an object.
Stars: ✭ 194 (+921.05%)
Mutual labels:  object, deep
Clone Deep
Recursively (deep) clone JavaScript native types, like Object, Array, RegExp, Date as well as primitives. Used by superstruct, merge-deep, and many others!
Stars: ✭ 229 (+1105.26%)
Mutual labels:  object, deep
go-streams
Stream Collections for Go. Inspired in Java 8 Streams and .NET Linq
Stars: ✭ 127 (+568.42%)
Mutual labels:  collection, array
Shallow Clone
Make a shallow clone of an object, array or primitive.
Stars: ✭ 23 (+21.05%)
Mutual labels:  object, array
Kibana Object Format
A Kibana plugin for displaying objects and arrays of objects.
Stars: ✭ 100 (+426.32%)
Mutual labels:  object, array
derivejs
DeriveJS is a reactive ODM - Object Document Mapper - framework, a "wrapper" around a database, that removes all the hassle of data-persistence by handling it transparently in the background, in a DRY manner.
Stars: ✭ 54 (+184.21%)
Mutual labels:  collection, object
underscore.haz
🔍 _.haz() is like _.has() but this underscore and/or lodash mixin lets you do deep object key existence checking with a dot denoted string, for example 'a.b.c'
Stars: ✭ 13 (-31.58%)
Mutual labels:  object, deep
Arrayy
🗃 Array manipulation library for PHP, called Arrayy!
Stars: ✭ 363 (+1810.53%)
Mutual labels:  collection, array
Collection
A PHP library for representing and manipulating collections.
Stars: ✭ 488 (+2468.42%)
Mutual labels:  collection, array
Containers
This library provides various containers. Each container has utility functions to manipulate the data it holds. This is an abstraction as to not have to manually manage and reallocate memory.
Stars: ✭ 125 (+557.89%)
Mutual labels:  collection, array
Morphism
⚡ Type-safe data transformer for JavaScript, TypeScript & Node.js.
Stars: ✭ 336 (+1668.42%)
Mutual labels:  object, array
What The Filter
A visual playground to JavaScript array & object transformations.
Stars: ✭ 128 (+573.68%)
Mutual labels:  object, array
Kind Of
Get the native JavaScript type of a value, fast. Used by superstruct, micromatch and many others!
Stars: ✭ 268 (+1310.53%)
Mutual labels:  object, array
object-visit
Call the given method on each value in the given object.
Stars: ✭ 19 (+0%)
Mutual labels:  collection, object
ss-search
The most basic, yet powerful text search.
Stars: ✭ 41 (+115.79%)
Mutual labels:  object, array
get
🚚 A really small and type-safe (requires TypeScript >= 4.1.3) function, that gets a nested value from an object using a path string (like "a.b[0].d"). If value is 'undefined' or unreachable returns the placeholder instead.
Stars: ✭ 13 (-31.58%)
Mutual labels:  object, deep
react-smart-key
Pass anything as key without re-renders
Stars: ✭ 17 (-10.53%)
Mutual labels:  collection, array
Map
PHP Map package for easy and elegant handling of PHP arrays as array-like map objects
Stars: ✭ 1,180 (+6110.53%)
Mutual labels:  collection, array

deep-sort-object

NPM version Downloads Build Status Dependency status Dev Dependency status Greenkeeper badge

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].