{"name":"sort-keys","version":"5.0.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"},"type":"module","exports":"./index.js","engines":{"node":">=12"},"scripts":{"test":"xo && ava && tsd"},"keywords":["sort","object","keys","key","stable","deterministic","deep","recursive","recursively","array","sorted","sorting"],"dependencies":{"is-plain-obj":"^4.0.0"},"devDependencies":{"ava":"^3.15.0","tsd":"^0.14.0","xo":"^0.38.2"},"gitHead":"0efa286f2923d83a825a3efd30e5c52f1f9a9307","bugs":{"url":"https://github.com/sindresorhus/sort-keys/issues"},"homepage":"https://github.com/sindresorhus/sort-keys#readme","_id":"sort-keys@5.0.0","_nodeVersion":"12.22.1","_npmVersion":"6.14.10","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-Pdz01AvCAottHTPQGzndktFNdbRA75BgOfeT1hH+AMnJFv8lynkPi42rfeEhpx1saTEI3YNMWxfqu0sFD1G8pw==","shasum":"5d775f8ae93ecc29bc7312bbf3acac4e36e3c446","tarball":"http://registry-npm.ywwl.com/sort-keys/download/sort-keys-5.0.0.tgz","fileCount":5,"unpackedSize":5939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeeMgCRA9TVsSAnZWagAACnsP/1y5KVoWaneyxf/+BQaI\nokT6Zy2YKKG2dVbsHL5puNd1uGHR1Hf7mxnj8EfhbiTox4AXyraMaZCKSbBA\neBkmJfWtbo0/uAB59EYGI9uwQNQzL0ugfV51bJbfK1Dp9QRTWJxHhJhfjTgI\nhXfZdXfHJxHWXtD1H1ZS/eux9GFeUrEW2wIROnd5dHbLVGQ9JXzRj67jpMtu\nle2RtUoQ4AsQoxthxZaUb25pIuWtgzOWV6F1YlxWUz1XuRYgYXRZWYVUFoHl\nJRG5CL7P3a1kfZ6NK7KgwPHdJtwdK1hK+XIizFz4f5WHFCTClX5n6yxP5b4I\nghMcsR/t7AceKFdaCSFzQROG3LzVjC0bqFhsgSEY/D4HCAI3oaHuv5zH/hUU\ndYr5YgjiOvR5Y45MFc+rB2W2ahLc6fnJp99oc479JSVqlBefYNGmojGTGawW\nmqvgnOqh7Wfmc7V5lrgLGE8lbFG1qrBwdi/3/hMyrNVUQt4Ho/m1GWI2etjo\nhN4VMqA4pQPcZ5bETryjBGOsyKG+pP5afBtdyoiNzlM0UTiSc9TvoCVTnVDk\nJs0AsQ/eqmuS93RQQt7fkths4cTuEtGY2/zDACY1GUozcAs6snpe2dB+j+po\noHJD+0y8X60eBQH899Lpa80BCX041s8raMn6okqm7QGE8xVN3PntMnSyEgGP\n1Iig\r\n=TNMo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB8VtYLwiaCmq4vdUa3xuiF0vWdsvPaJlyNz/5qxfjUBAiAH8WoE+2NfdVB3IYUtazZsreh6YSmT6ZuupPb8itNJ0g=="}],"size":2601,"noattachment":false,"key":"/sort-keys/-/sort-keys-5.0.0.tgz"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sort-keys_5.0.0_1618600736465_0.996820494032612"},"_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":1618600736621,"_cnpm_publish_time":1618600736621,"dist-tags":{"latest":"6.0.1"}}