{"name":"camelcase-keys","version":"8.0.2","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"},"type":"module","exports":"./index.js","types":"./index.d.ts","engines":{"node":">=14.16"},"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":"^7.0.0","map-obj":"^4.3.0","quick-lru":"^6.1.1","type-fest":"^2.13.0"},"devDependencies":{"ava":"^4.3.0","matcha":"^0.7.0","tsd":"^0.23.0","xo":"^0.49.0"},"xo":{"overrides":[{"files":"bench/bench.js","rules":{"import/no-unresolved":"off"}}]},"gitHead":"015d7901a509642a6fda41d6bae56e7c06793a7c","bugs":{"url":"https://github.com/sindresorhus/camelcase-keys/issues"},"homepage":"https://github.com/sindresorhus/camelcase-keys#readme","_id":"camelcase-keys@8.0.2","_nodeVersion":"14.19.3","_npmVersion":"8.3.2","dist":{"integrity":"sha512-qMKdlOfsjlezMqxkUGGMaWWs17i2HoL15tM+wtx8ld4nLrUwU58TFdvyGOz/piNP842KeO8yXvggVQSdQ828NA==","shasum":"a7140ba7c797aea32161d4ce5cdbda11d09eb414","tarball":"http://registry-npm.ywwl.com/camelcase-keys/download/camelcase-keys-8.0.2.tgz","fileCount":5,"unpackedSize":11622,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDyJYZCLVY71xjhTD1p6qLicKmIUJutnAFqV5xsbRis3wIhAMHBsJ/AscDTURWKtYCqSElJX9umCtK/PUX7U0ui81JL"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjDGqrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp0MQ/+NY12VeNXVwpwzdYz3xJiKpnXcljWoVC2dh4h9y1GJoIp3YzT\r\nw0ON+H4mlhQjzIdhqg6WlW3kmFGiRZDUVJvbnuvKYZs4Fi8W9STdRM1SPEfz\r\nQIN0WlDLeXMHgl1OlP1p3ACIuyuSLuwl798N6vR6ETZ4mIDD3upev/0B/SYU\r\nLlJSq+EgjZwb+xQ2BgY1kIa8uR8j0Bq09rPctFx1wSaF/QH9bKdB35HvefTi\r\n08WiZ5Xm6vdSMNsApx5PxfltmS7f1Dr9pf5JNwHDtEPn3kHDfE4EwEL6wg3b\r\n/P1UnABsqILlQHljb9yvPvm3aMeqxCGyhiiMiE7UD6ZY0NuA1N0Z1vAC0iGr\r\n7/Q0Ro1nSsg1mu0BI2qRhMkAPd8JW0hPS+SIx7uY/+3uUv4biooKl4lQ0e/U\r\n+CbCIpO987KnArVmXDiXJTj+Vy/j9r5qXbDoCTBKU6l8LIgHwJuOf+JSydv/\r\nzh4HfThW3HNnfOZBjJz7RpRgdbaRPQRNWO1INRNcDLA+K9iOlrNsmeJGQR9k\r\n18NTVCnxkYjdjnl5v6ym/zP1mP33fmaJEcgHEEgatpiLibygVELi6TeV9NDY\r\nr6I1BcfbDEuvYSZhjokb5/VJJoSj7dt0hZbXUmN40p0cvJhTpCaNXu3l/kaQ\r\n0oT7G+JNIVOrRAURRB5d8vdXMZ/zjdXpKMA=\r\n=nQX5\r\n-----END PGP SIGNATURE-----\r\n","size":4189,"noattachment":false,"key":"/camelcase-keys/-/camelcase-keys-8.0.2.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_8.0.2_1661758123306_0.9268958105097482"},"_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":1661758123451,"_cnpm_publish_time":1661758123451,"dist-tags":{"latest":"10.0.3"}}