{"name":"camelcase-keys","version":"6.1.0","description":"Convert object keys to camel case","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/camelcase-keys.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd","bench":"matcha bench/bench.js"},"keywords":["map","obj","object","key","keys","value","values","val","iterate","camelcase","camel-case","camel","case","dash","hyphen","dot","underscore","separator","string","text","convert","deep","recurse","recursive"],"dependencies":{"camelcase":"^5.3.1","map-obj":"^4.0.0","quick-lru":"^4.0.1"},"devDependencies":{"ava":"^2.1.0","matcha":"^0.7.0","tsd":"^0.9.0","xo":"^0.25.3"},"xo":{"overrides":[{"files":"bench/bench.js","rules":{"import/no-unresolved":"off"}}]},"gitHead":"324e2cbf831396f532ba553fb1ded6ddf7bc2dc9","bugs":{"url":"https://github.com/sindresorhus/camelcase-keys/issues"},"homepage":"https://github.com/sindresorhus/camelcase-keys#readme","_id":"camelcase-keys@6.1.0","_nodeVersion":"10.16.3","_npmVersion":"6.11.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-43tBGDIs3SBDA5R5mYzkiBP3lt2IKhLDp1wVGS9XTq6SR3+7ZNdi/VwBJsk4NKgySoaziTrKM+N8hhT04NBVUA==","shasum":"3ca09b3cae196a58e291a6913ce97ffc8f8ae850","tarball":"http://registry-npm.ywwl.com/camelcase-keys/download/camelcase-keys-6.1.0.tgz","fileCount":5,"unpackedSize":8555,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqa0RCRA9TVsSAnZWagAAnAgP/i1FIXprhXc1wBMlwgBc\nZ77Zi+68bRkbZNulmFwQJhxmbA73Ih4Yui2jb22mG+ApiLVE3djHW0lq0Vf3\npGwhronyO8UItYO37MW9gIRcxhF4sQ0wM2o+xJibndAW44hB4sIVFWQKke9n\n/V2y7W4jmxcUFDt2u/pw2oFlpRTowb/J76XOQJQRnChd1tQ7LB4nTnfnsleG\nOG7XBnDrUsbWeGZ3pk9nrBLNN1sl+RWWXO1FPK2cptZ+Ry4IK7sZkvmKQ5Wy\n6FyUCnLclrBctT+8pp/+KhywKgm17FpJINXit9KMgF1ZuDU4UzjzWbD7AM15\nADrTvWpUHlF7tLiEKSrcOBhdysZacYz1bTzfHq4GDtMcDzBNYxpdkP5zBAQr\nIk8cyjzw0DxpYX3XQvW72poiuUoTh6vij8lyoLSefOl2mRlf0CJiSiFsGChV\ntBrsg/mI4sOP8bXYn7X4nNk9N4lf/QnFfu27YEY2ZyIwr8eKaDUle0EbTqd/\nL056dVUeESG/CuhzW3kgw8YB0gk66vT2i9GEnYqkJMHVo8x8y5Xeym0CTrcq\nsTn9HpE7WdB3oVv+aucctDsxCj0GOF9YfYiPzK/WQdQDKrgfk8c54iuGV61q\nNygMfHWT72VNABantFBUOlQ53Ix4UJReaxEvWQrCpwFueOHip5ghDOYqTwZL\ngsub\r\n=FEsG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCBHVyiF6rILtS3TWf8Hl891f0cqQYTXT5MaZw/vgEV/wIgaZBIC6KCe+A5jEMnw7dCDXSRb+AyeN1OwfcZEssCSc4="}],"size":3341,"noattachment":false,"key":"/camelcase-keys/-/camelcase-keys-6.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/camelcase-keys_6.1.0_1571400976542_0.8219187805653612"},"_hasShrinkwrap":false,"readme":"# camelcase-keys\n\n> Convert object keys to camel case using [`camelcase`](https://github.com/sindresorhus/camelcase)\n\n## Install\n\n```sh\nnpm install camelcase-keys\n```\n\n## Usage\n\n```js\nimport camelcaseKeys from 'camelcase-keys';\n\n// Convert an object\ncamelcaseKeys({'foo-bar': true});\n//=> {fooBar: true}\n\n// Convert an array of objects\ncamelcaseKeys([{'foo-bar': true}, {'bar-foo': false}]);\n//=> [{fooBar: true}, {barFoo: false}]\n```\n\n```js\nimport {parseArgs} from 'node:util';\nimport camelcaseKeys from 'camelcase-keys';\n\nconst commandLineArguments = parseArgs();\n//=> {_: [], 'foo-bar': true}\n\ncamelcaseKeys(commandLineArguments);\n//=> {_: [], fooBar: true}\n```\n\n## API\n\n### camelcaseKeys(input, options?)\n\n#### input\n\nType: `Record<string, unknown> | ReadonlyArray<Record<string, unknown>>`\n\nA plain object or array of plain objects to camel-case.\n\n#### options\n\nType: `object`\n\n##### exclude\n\nType: `Array<string | RegExp>`\\\nDefault: `[]`\n\nExclude keys from being camel-cased.\n\n##### deep\n\nType: `boolean`\\\nDefault: `false`\n\nRecurse nested objects and objects in arrays.\n\n```js\nimport camelcaseKeys from 'camelcase-keys';\n\nconst object = {\n\t'foo-bar': true,\n\tnested: {\n\t\tunicorn_rainbow: true\n\t}\n};\n\ncamelcaseKeys(object, {deep: true});\n//=> {fooBar: true, nested: {unicornRainbow: true}}\n\ncamelcaseKeys(object, {deep: false});\n//=> {fooBar: true, nested: {unicorn_rainbow: true}}\n```\n\n##### pascalCase\n\nType: `boolean`\\\nDefault: `false`\n\nUppercase the first character: `bye-bye` → `ByeBye`\n\n```js\nimport camelcaseKeys from 'camelcase-keys';\n\ncamelcaseKeys({'foo-bar': true}, {pascalCase: true});\n//=> {FooBar: true}\n\ncamelcaseKeys({'foo-bar': true}, {pascalCase: false});\n//=> {fooBar: true}\n````\n\n##### preserveConsecutiveUppercase\n\nType: `boolean`\\\nDefault: `false`\n\nPreserve consecutive uppercase characters: `foo-BAR` → `FooBAR`\n\n```js\nimport camelcaseKeys from 'camelcase-keys';\n\ncamelcaseKeys({'foo-BAR': true}, {preserveConsecutiveUppercase: true});\n//=> {fooBAR: true}\n\ncamelcaseKeys({'foo-BAR': true}, {preserveConsecutiveUppercase: false});\n//=> {fooBar: true}\n````\n\n##### stopPaths\n\nType: `string[]`\\\nDefault: `[]`\n\nExclude children at the given object paths in dot-notation from being camel-cased.\n\nFor example, with an object like `{a: {b: '🦄'}}`, the object path to reach the unicorn is `'a.b'`.\n\n```js\nimport camelcaseKeys from 'camelcase-keys';\n\nconst object = {\n\ta_b: 1,\n\ta_c: {\n\t\tc_d: 1,\n\t\tc_e: {\n\t\t\te_f: 1\n\t\t}\n\t}\n};\n\ncamelcaseKeys(object, {\n\tdeep: true,\n\tstopPaths: [\n\t\t'a_c.c_e'\n\t]\n}),\n/*\n{\n\taB: 1,\n\taC: {\n\t\tcD: 1,\n\t\tcE: {\n\t\t\te_f: 1\n\t\t}\n\t}\n}\n*/\n```\n\n## Related\n\n- [decamelize-keys](https://github.com/sindresorhus/decamelize-keys) - The inverse of this package\n- [snakecase-keys](https://github.com/bendrucker/snakecase-keys)\n- [kebabcase-keys](https://github.com/mattiloh/kebabcase-keys)\n","publish_time":1571400976662,"_cnpm_publish_time":1571400976662,"dist-tags":{"latest":"10.0.3"}}