{"name":"camelcase-keys","version":"5.1.0","description":"Convert object keys to camelCase","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":">=6"},"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":"^3.0.0","quick-lru":"^1.0.0"},"devDependencies":{"ava":"^1.4.1","matcha":"^0.7.0","tsd":"^0.7.2","xo":"^0.24.0"},"xo":{"overrides":[{"files":"bench/bench.js","rules":{"import/no-unresolved":"off"}}]},"gitHead":"b367160a19374463a8e2bcdceda2874415b85900","bugs":{"url":"https://github.com/sindresorhus/camelcase-keys/issues"},"homepage":"https://github.com/sindresorhus/camelcase-keys#readme","_id":"camelcase-keys@5.1.0","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-eZJ8mFhctds8vW/Lo/a2CXFrCEzJurUU05Tx2ReiXaW4aVBJBNxOvtGHf/GQdjHMQTZE11FCRhrdRlM4Se5umA==","shasum":"b87cfca2eb5fe2535f6c3418b394c3a35f72a865","tarball":"http://registry-npm.ywwl.com/camelcase-keys/download/camelcase-keys-5.1.0.tgz","fileCount":5,"unpackedSize":5725,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcrBS9CRA9TVsSAnZWagAAmGsQAKA4rRlpPvNgXhJ7Xa4b\n1G4Aft8Otqtf+mdIwzwt71eupjx9J0wZ+nrUVtF63PCeEFikhFoTOM//kspk\neHCC/+Xq+M7k8tYlSdjL1k2gpglAiz67XUDQB2E1AuHL8uaKMZcTQpdsfqqf\nsTyWUGZtHn6SkhVLc9FfM8hU5Aetf1IhVTSix9+q0sFz1I5Cq9Zo27X4n8WJ\nhkQ5YLDMW+fDBzzl0DPfJ1WFZbd/RzhMuNrgaXjl6doeAMGFRSmla23mohR+\nL4n9h8554oYtR6Gv1dv1rA5RZfGujw/OFdnvr9unbab+X4bP4rR1a5Iw6PLJ\ncI0fQ3QvpdsQ5V524PWvwKVL/GF5oHP/JjnBa7DjFdwC49/xqF46s3w3EAMF\naXEZ6Jc3/RuZG12N3QMVnN6TRWoknFgLbopQjWjtEOjHAfSc0jI1NY3OwM8S\nO9FDwa7EJyI89Y3EKlcE803vlY/MPOv5r7v3zO/JlbhWmEUzYy70Zthf1Ugb\nyFT/EvbQHFjLSZfdEQSP/e/kj4NCwXuRuQmdvU+HsO8jiGvFc0I0pkqAghDz\nZCAG8wsXkmUntn3GoPDXIEsjBkuNLmuJJvAv+jkAD7zX25ZuR5NDCL7MnxiZ\nIk+UMs9DqV9k1npA5cqKG91zkrE4srm9auYNPZOUMH69+Fp2zUy26aluFycB\nFcus\r\n=i5EX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDJwb9Ve3JNWTZTIIUEAgL0mGRx2/KroTsfCDkjj02yBwIhAMCrHZU9mwh4PPhKtmzGm5vDymaNq/DQ99tBrmT6nIYh"}],"size":2456,"noattachment":false,"key":"/camelcase-keys/-/camelcase-keys-5.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/camelcase-keys_5.1.0_1554781373012_0.5072586920416309"},"_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":1554781373163,"_cnpm_publish_time":1554781373163,"dist-tags":{"latest":"10.0.3"}}