{"name":"sort-keys","version":"3.0.0","description":"Sort the keys of an object","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/sort-keys.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["sort","object","keys","key","stable","deterministic","deep","recursive","recursively"],"dependencies":{"is-plain-obj":"^2.0.0"},"devDependencies":{"ava":"^1.4.1","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"70c831714c67670fc97e4c4fbc9049de6e3d6fbc","bugs":{"url":"https://github.com/sindresorhus/sort-keys/issues"},"homepage":"https://github.com/sindresorhus/sort-keys#readme","_id":"sort-keys@3.0.0","_nodeVersion":"8.16.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-77XUKMiZN5LvQXZ9sgWfJza19AvYIDwaDGwGiULM+B5XYru8Z90Oh06JvqDlJczvjjYvssrV0aK1GI6+YXvn5A==","shasum":"fa751737e3da363ef80632d4fd78e324d661fe9a","tarball":"http://registry-npm.ywwl.com/sort-keys/download/sort-keys-3.0.0.tgz","fileCount":5,"unpackedSize":4511,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcz+28CRA9TVsSAnZWagAA4LMP/2lnxDB9QKBnk6Ihti/3\nyPzjS3BxIAIKJAWldVR5hZRtj5wJPlDuGTdNJXz7e6jHw8J470OqpbQ6g/j3\nZ8eoMgEWKqn+9iMYb4RBgtXJr5z3opC4AYOMa6aR6P1KL59mTbrnvcM2aoOQ\nK58hi/nZmEg/jQhQw/gDMFjasqNtvV4x7odTRbTqxi2qn/+8PE0wqEh6a3Kd\nqiiI2Z78lOST57usX5WcUcrbQVDbRImOQ1lXbMEbwlTUgKKFbouN3iv0OePK\n3qOO9NQi2DI9EWgJAcQC6sBKu5sfedBjeXaLjUInD3txrqxaRgotYZSWg4rE\nqX8K/ENYPEpq3oTJhBSlbkS0wjinEMxhvF7A6ICgsVlYUPo9J+ChHM5bUvid\nXgxr3qm/W9ApBAggSIU2o1cnpbaltt7dExz6zbEA/8mKXcvXjh7JwgXx2tOo\nJnnp7XA9j3iTCT2Z/pNZSuJZF9oKS5LQG++EIeDI8HW5FSm/NZ38TsM+Hb2g\n3ab9p1XJyMekTYqJ5GKH+OesNiE4BO7AeN6/l90SQ+O37XurSLxd7GM7Jtqb\nkrNRm8GrU1A39bI+Yj2SoA5lCbtUA7Sdi4WwWbeBAKjtjoBvuhjUs6lra811\nnOnYQQAyFW1lSpI3Hn9D1xECCnqroupQY19nHDKpijKWy3ae1tceecTxL6FO\nZINm\r\n=pDl5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGnKxU+2RwdTIvNTVRXfN1BUuup4FLznY4YNsU6QlZmzAiEAxbkNuf1paKSI6FxiQoB4ETkjXlXLpuSU3Zd0GmHHQtk="}],"size":2189,"noattachment":false,"key":"/sort-keys/-/sort-keys-3.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sort-keys_3.0.0_1557130684213_0.7700247300394383"},"_hasShrinkwrap":false,"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":1557130684347,"_cnpm_publish_time":1557130684347,"dist-tags":{"latest":"6.0.1"}}