Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
I can sort Object in JavaScript
JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
.gitignore
.npmignore
.travis.yml
Makefile
README.md
index.js
package.json

README.md

sortobj

Build Status

Convert Object to corresponding sorted-key Array.

Installation

$ npm install sortobj

Examples

var sortobj = require('sortobj');

obj = {b: {z: 1, y: 2}, c: 3, a: 1};
arr = [['a', 1], ['b', [['y', 2], ['z', 1]]], ['c', 3]];
sortobj(obj).should.eql(arr);
Something went wrong with that request. Please try again.