{"name":"sort-keys","version":"4.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":"^2.2.0","tsd":"^0.7.4","xo":"^0.24.0"},"gitHead":"a3d55abdfd8bdf82117d657118cb6774f4170e72","bugs":{"url":"https://github.com/sindresorhus/sort-keys/issues"},"homepage":"https://github.com/sindresorhus/sort-keys#readme","_id":"sort-keys@4.0.0","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-hlJLzrn/VN49uyNkZ8+9b+0q9DjmmYcYOnbMQtpkLrYpPwRApDPZfmqbUfJnAA3sb/nRib+nDot7Zi/1ER1fuA==","shasum":"56dc5e256637bfe3fec8db0dc57c08b1a2be22d6","tarball":"http://registry-npm.ywwl.com/sort-keys/download/sort-keys-4.0.0.tgz","fileCount":5,"unpackedSize":5495,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdVTMBCRA9TVsSAnZWagAALaAP/3vOz6Oveo3VJUthFYlA\nUOcw34kaF6bLsM+kDwnxjcjXUQmIhmaCqK6OLgt3G/WCcK3V7kumYPwmtlaP\nqsRnl4Bug741XLdeRHlrJx7NRNS+Zlbs5rHexfCVy05u3ADvtqumInX16bG6\nhSJgrUFyDie4tr2OBp/L4wv7Y4Egy7pNQEdeHWWB/QbS/ikdukpSMpOulw/y\nC6ZQt3pYy/hKoai4BF2asuol6vvgBy067NhFWU3nrvouKJ1n+2YI6L62BEVF\n4b1f4OcZ/3qpezs1vMnazYLm97/7F1cRQ6xb6b5tSsMj+auudz6ZSluVSR6b\n3nHKVcCXgBJiprs4fRWDa+Xbl8kkJxpC5qSE9+RG86e8r4yURv63RV4KXJ2l\ns2sfMgaO/elVYBHA9+owgsv7F3UeV9DoOzjhfKwQ/A9ssTHZBXRsRdoW0ROu\na+p6krQDYoNJRs5tR2AqX88EJQa4v8h8KvNeTsWuhMUpgV1KB3sYW3dPKtGn\nQFHEFDO7ZN/BXsYxRTDz1tnktnV8ZsVbMhIMKzaca6GvJBhVxXUW/R+v9n1Q\njEPkFZgcx2KU7C4hQJawaCpPKbXW+StJSppXInkzB3tQuXCohFKDuqLQVL7k\nc4fXJwcIDfsNCYJ5aRNxGkG3RYlZmnTbMQcTlxOMCzhwGghbMVYHOllR9r3W\npb93\r\n=gTO2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDcVtxTTQzDZkFsvT89onyWXCoSnCLSF3u6+QlHq+3xlwIhAInxO1nCD3MPINatojfIrqWUQSrQE+zusjrWczQA9Zdu"}],"size":2482,"noattachment":false,"key":"/sort-keys/-/sort-keys-4.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sort-keys_4.0.0_1565864704278_0.010753726297067168"},"_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":1565864704466,"_cnpm_publish_time":1565864704466,"dist-tags":{"latest":"6.0.1"}}