{"xo":{"rules":{"@typescript-eslint/unified-signatures":"off"}},"_id":"camelcase-keys@10.0.3","bugs":{"url":"https://github.com/sindresorhus/camelcase-keys/issues"},"dist":{"shasum":"71f4d0c7ffbe3e140051abc6b5d15a39d7314fe7","tarball":"http://registry-npm.ywwl.com/camelcase-keys/download/camelcase-keys-10.0.3.tgz","fileCount":5,"integrity":"sha512-+WSfgt7e6uZSWfEO9xdFmWEf/bwvA6lJY2mmj4U+N1MHY6h01jQUlZ2dyxnaL4dumg/cxXyRci1fKUtGQfX5+g==","signatures":[{"sig":"MEUCIQDoy3GZ+BGYHLxMoBlqz8jtRtTyTYYe9ZlTV7XfQXKxsAIgUo61SEqzHSSdh17bu6oAGWxQR/6hzc8o4JSQeflHTPA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDJpiMgx0+p7uuHd/nnHC3rS1RhgAvDEzPB1iupAJRC/QIhAN6Jea0kL7vuA5CY1KrXvczEluli/HKrhPiw8AELnNXO"}],"unpackedSize":17026,"size":5396,"noattachment":false,"key":"/camelcase-keys/-/camelcase-keys-10.0.3.tgz"},"name":"camelcase-keys","type":"module","types":"./index.d.ts","author":{"url":"https://sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"engines":{"node":">=20"},"exports":{"types":"./index.d.ts","default":"./index.js"},"funding":"https://github.com/sponsors/sindresorhus","gitHead":"5b57e0a0716b99ed70a8971e60b33523b2939327","license":"MIT","scripts":{"test":"xo && ava && tsd","bench":"matcha bench/bench.js"},"version":"10.0.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"homepage":"https://github.com/sindresorhus/camelcase-keys#readme","keywords":["map","object","key","keys","value","values","iterate","camelcase","camel-case","camel","case","dash","hyphen","dot","underscore","separator","string","text","convert","pascalcase","pascal-case","deep","recurse","recursive"],"repository":{"url":"git+https://github.com/sindresorhus/camelcase-keys.git","type":"git"},"_npmVersion":"12.0.1","description":"Convert object keys to camel case","directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"sideEffects":false,"_nodeVersion":"26.9.0","dependencies":{"map-obj":"6.0.0","camelcase":"^9.0.0","quick-lru":"^7.3.0","type-fest":"^5.4.1"},"_hasShrinkwrap":false,"devDependencies":{"xo":"^1.2.3","ava":"^6.4.1","tsd":"^0.33.0","matcha":"^0.7.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/camelcase-keys_10.0.3_1789918969690_0.5014007994335183"},"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\nLeading `_` and `$` are preserved as they have semantic meaning.\n\n```js\ncamelcaseKeys({_foo_bar: true, $baz_qux: true});\n//=> {_fooBar: true, $bazQux: 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\nFor correct TypeScript types when using this option with a string array, add `as const` to the array.\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. This option only has an effect together with the `deep` option.\n\nThe paths use the input key casing, so for example, with an object like `{a_b: {c_d: '🦄'}}`, the object path to reach the unicorn is `'a_b.c_d'`.\n\nThe key at a stopped path is still camel-cased. Only its children are left alone.\n\nFor correct TypeScript types when using this option, add `as const` to the array.\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\nWhen an object is inside an array, the path is specified without array indices. A `stopPath` will apply to all items in the array.\n\n```js\nimport camelcaseKeys from 'camelcase-keys';\n\nconst object = {\n\tfoo: [\n\t\t{\n\t\t\tbar: {\n\t\t\t\tbaz_qux: 'value'\n\t\t\t}\n\t\t}\n\t]\n};\n\ncamelcaseKeys(object, {\n\tdeep: true,\n\tstopPaths: [\n\t\t'foo.bar'\n\t]\n}),\n/*\n{\n\tfoo: [\n\t\t{\n\t\t\tbar: {\n\t\t\t\tbaz_qux: 'value'\n\t\t\t}\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":1789918969772,"_cnpm_publish_time":1789918969772,"dist-tags":{"latest":"10.0.3"}}