{"name":"sort-keys","version":"0.1.0","description":"Sort the keys of an object","license":"MIT","repository":{"type":"git","url":"git://github.com/sindresorhus/sort-keys"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":["object","obj","keys","key","sort"],"devDependencies":{"mocha":"*"},"bugs":{"url":"https://github.com/sindresorhus/sort-keys/issues"},"homepage":"https://github.com/sindresorhus/sort-keys","_id":"sort-keys@0.1.0","_shasum":"aaae2d5563d6b8cf914215e9f65b7aea30cab469","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"dist":{"shasum":"aaae2d5563d6b8cf914215e9f65b7aea30cab469","tarball":"http://registry-npm.ywwl.com/sort-keys/download/sort-keys-0.1.0.tgz","integrity":"sha512-/5Bjc/pC+dr9Smyz3aoojvf7IMOhVVfw+Np602pLthwP0RY290DXb0QMvMI/59p8IVT+etVysn5GqIFkOxCQ2Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFBDy4CC6LVnERxm1DkmVafY9e6+xBqk0FcGUgLwVz8TAiEAhdljeR+SBMuSvLHYjkTrw3udSj/ahkcr6r9OZ2+aNow="}],"size":1013,"noattachment":false,"key":"/sort-keys/-/sort-keys-0.1.0.tgz"},"directories":{},"readme":"# sort-keys\n\n> Sort the keys of an object\n\nUseful to get a deterministically ordered object, as the order of keys can vary between engines.\n\n## Install\n\n```\n$ npm install sort-keys\n```\n\n## Usage\n\n```js\nimport sortKeys from 'sort-keys';\n\nsortKeys({c: 0, a: 0, b: 0});\n//=> {a: 0, b: 0, c: 0}\n\nsortKeys({b: {b: 0, a: 0}, a: 0}, {deep: true});\n//=> {a: 0, b: {a: 0, b: 0}}\n\nsortKeys({b: [{b: 0, a: 0}], a: 0}, {deep: true});\n//=> {a: 0, b: [{a: 0, b: 0}]}\n\nsortKeys({c: 0, a: 0, b: 0}, {\n\tcompare: (a, b) => -a.localeCompare(b)\n});\n//=> {c: 0, b: 0, a: 0}\n\nsortKeys([{b: 0, a:2}], {deep: true});\n//=> [{a: 2, b: 0}]\n```\n\n## API\n\n### sortKeys(object, options?)\n\nReturns a new object with sorted keys.\n\n#### object\n\nType: `object | Array`\n\n#### options\n\nType: `object`\n\n##### deep\n\nType: `boolean`\\\nDefault: `false`\n\nRecursively sort keys, including keys of objects inside arrays.\n\n##### compare\n\nType: `Function`\n\n[Compare function.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort)\n\n---\n\n<div align=\"center\">\n\t<b>\n\t\t<a href=\"https://tidelift.com/subscription/pkg/npm-sort-keys?utm_source=npm-sort-keys&utm_medium=referral&utm_campaign=readme\">Get professional support for this package with a Tidelift subscription</a>\n\t</b>\n\t<br>\n\t<sub>\n\t\tTidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.\n\t</sub>\n</div>\n","publish_time":1403961639025,"_cnpm_publish_time":1403961639025,"dist-tags":{"latest":"6.0.1"}}