1.0.1 • Published 9 years ago

sortkeys v1.0.1

Weekly downloads
19
License
-
Repository
github
Last release
9 years ago

sortkeys

Build Status

This function recursively sorts the keys of an object according to Object.keys(obj).sort().

An example should explain it:

var sortkeys = require('sortkeys');

var objToSort = {
  d : "is for dog"
  , c : "is for cat"
  , f : "is for fig"
  , a : "is for ant"
};

console.log(sortkeys(objToSort));

/*
{ a: 'is for ant',
  c: 'is for cat',
  d: 'is for dog',
  f: 'is for fig' }
*/

license

MIT

1.0.1

9 years ago

1.0.0

9 years ago

0.2.0

11 years ago

0.1.1

12 years ago