{"name":"sort-keys","version":"4.2.0","description":"Sort the keys of an object","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/sort-keys.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://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":"^2.2.0","tsd":"^0.7.4","xo":"^0.24.0"},"gitHead":"5b404fae29e3c60bf34d2d7a0065e8dc6bc04d23","bugs":{"url":"https://github.com/sindresorhus/sort-keys/issues"},"homepage":"https://github.com/sindresorhus/sort-keys#readme","_id":"sort-keys@4.2.0","_nodeVersion":"15.5.0","_npmVersion":"6.14.10","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-aUYIEU/UviqPgc8mHR6IW1EGxkAXpeRETYcrzg8cLAvUPZcpAlleSXHV2mY7G12GphSH6Gzv+4MMVSSkbdteHg==","shasum":"6b7638cee42c506fff8c1cecde7376d21315be18","tarball":"http://registry-npm.ywwl.com/sort-keys/download/sort-keys-4.2.0.tgz","fileCount":5,"unpackedSize":6041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7CgxCRA9TVsSAnZWagAAbsEP/18uH5MNrWLzmpjbJXo5\n1I2V4VKaKAHDpEsn8zOzF/oxMSY2Iban0+xQ2dl+mjx1Viyezehz552ibGKv\nnJxRO3U/Q+qLyUM997f6cuzCAeEtmK5PjZvKGZZNgYtu/q1q01pAZxs2Vids\ntfeHLKbVR5/XXK6JIj9B6lyPTHXmzy/6e+87jnkDOq08jwCLOJIcxPntlDsf\nnYmWQwCPtBKdZHW2Zu7iqaHG3zDHOfJrr690KJ14Mmw1QA7pbIiPFs1VNnUQ\niCzaMWD+xgUbqJAPLY2B+o6GGu6Zu2qdz9J3WEkJd2S9AimVi/auB4AlMwn3\ntYK4JJmXQKXoR3Mqpaz3gJloYmT8x/EJW30QPfrIU5IPCoNOSHxziHLQ2tUm\nhYwYeazEdV0YWuif3OKEbpunpluKOlzwTcSF+lDFnlXohYtjy2q8ps2K1i03\nZ2gouBwuC6f9A3uAOjRXZVKaWnzxxUW4JuDGVgAUBqduk3TauT0bNgnfCBbT\nfV6PjG906BG3Pi4pgKZKAcwbT/2mdN7ZngIzwI62Fl8i5zdjcnQMmyhANrA8\nqTLT9lJI1IusoFv4FPC15lcsViWdPlS95X+VIRfs+sPUiwemF3dGAlcmnJxr\n3Wj+Jr8a9KHQJzVcyZeRlh95f10c2ISP2btJZUDvpfkN3nj9K81tNy4aya40\nYLZh\r\n=f6hG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGAkzQr3lk+vRz0dn8I0Q5VT0dnz/xGGsm+jPyKEdsFvAiAWMjQ7ItwVEoEPBzyPzQqZ26qu0APhxNPb/v5xZtUzhA=="}],"size":2648,"noattachment":false,"key":"/sort-keys/-/sort-keys-4.2.0.tgz"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sort-keys_4.2.0_1609312305095_0.12473893671027647"},"_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":1609312305350,"_cnpm_publish_time":1609312305350,"dist-tags":{"latest":"6.0.1"}}