sort-object

Sort the keys in an object

npm install sort-object
268 downloads in the last day
1 705 downloads in the last week
6 953 downloads in the last month

sort-object NPM version

Sort the keys in an object

Quickstart

npm i sort-object --save
var sort = require('sort-object');
var outOfOrder = {
  'foo': 1,
  'baz': 2,
  'bar': 3
};
console.log('before: ', outOfOrder);


var inOrder = sort(outOfOrder);
console.log('inOrder: ', inOrder);
console.log('after: ', outOfOrder);

Run the tests

npm i mocha -g

then run:

mocha

Author

License

Copyright (c) 2013 Brian Woodward Licensed under the MIT license.


Project created by Assemble.

npm loves you