{"name":"camelcase-keys","version":"7.0.0","description":"Convert object keys to camel case","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/camelcase-keys.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"engines":{"node":">=12"},"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","pascalcase","pascal-case","deep","recurse","recursive"],"dependencies":{"camelcase":"^6.2.0","map-obj":"^4.1.0","quick-lru":"^5.1.1","type-fest":"^1.2.1"},"devDependencies":{"ava":"^2.4.0","matcha":"^0.7.0","tsd":"^0.17.0","xo":"^0.36.1"},"xo":{"overrides":[{"files":"bench/bench.js","rules":{"import/no-unresolved":"off"}}]},"gitHead":"1487fd51ab59db30d0223efce181f9c988ec9b61","bugs":{"url":"https://github.com/sindresorhus/camelcase-keys/issues"},"homepage":"https://github.com/sindresorhus/camelcase-keys#readme","_id":"camelcase-keys@7.0.0","_nodeVersion":"12.22.1","_npmVersion":"7.10.0","dist":{"integrity":"sha512-qlQlECgDl5Ev+gkvONaiD4X4TF2gyZKuLBvzx0zLo2UwAxmz3hJP/841aaMHTeH1T7v5HRwoRq91daulXoYWvg==","shasum":"40fcbe171f7432888369d0c871df7cfa5ce4f788","tarball":"http://registry-npm.ywwl.com/camelcase-keys/download/camelcase-keys-7.0.0.tgz","fileCount":5,"unpackedSize":10939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1ZDFCRA9TVsSAnZWagAAm7UP/1nyhDfmBLwQQJ0sbcLm\nD+0rBCldgV2uVMbwjj0zqQ9YLMCr+N+HJh6DGg6IOlnfOm9QudR3mhAIyKdb\n5WyC3ODdF8ZcVZAHPQHCAq4zBoTAsAVKDtst1gLYjmN2cqUjhAAbvPv+/XxD\nKN/51bcHO1X7M/wttTKbvVY8w0OrKrFYrhC9lOpBGsm0CisEWrh7GTpwaB93\npIVbetUlSS59jt+0TrsWYqqE8KrbljveCqw6JVjnid3ZX6Vt+/EqJjx4YqpF\ngH4jFtOJC9hAL0SOt5HqxgFQDQCYaBeUufxEpg1eH4DgzW+zwWEhpfgyjBy0\nLKke1DPDtbb1q1FGyeIJPuQNZEGdIZ+pQbP15vlWr7TXiurJzCOXDvISA9+n\nXNJoa6/hVDrGaKOc6ZeSPlkb2Jf514AWn5kCgUB1pS2jOlYalt+kl2JYZmQZ\nd0oBYTzWAXHjJ2Pl1406aljhb/QLjfdODxZFquoXpW9uAhSCAIQJavspIrqs\nbtaL53PNzf3+q8xja1Er8x1z4PvgKr08m4vUXU6duu5yBtORRvkEvxpnicgY\nfj4JmZD4bTGdiI/IAJwpOiinCSHLad/UNAQWff0pwgMk5EdmcMVrnBhbo9i2\njqqxnVjet/elfIr0xj+1k3YL3PTV2utlvxypYVqdNo4HzszL5FPCQlt2q9nI\n/xjj\r\n=04TR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFUDPxZcX57kKgU4SOrUsWSTKauTZIU5CoF19RcHtpoYAiBPiIgYi5Ypc6lNiouyh4HkEttJU0mKA6CkXXgEQDLmLg=="}],"size":4150,"noattachment":false,"key":"/camelcase-keys/-/camelcase-keys-7.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/camelcase-keys_7.0.0_1624608964772_0.3600649696565068"},"_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":1624608964963,"_cnpm_publish_time":1624608964963,"dist-tags":{"latest":"10.0.3"}}