{"name":"camelcase-keys","version":"6.0.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.7.3","xo":"^0.24.0"},"xo":{"overrides":[{"files":"bench/bench.js","rules":{"import/no-unresolved":"off"}}]},"gitHead":"807dd95f34bf2d21c0635e7477f5dc8b599acb48","bugs":{"url":"https://github.com/sindresorhus/camelcase-keys/issues"},"homepage":"https://github.com/sindresorhus/camelcase-keys#readme","_id":"camelcase-keys@6.0.0","_nodeVersion":"8.16.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-NW1C7M9/uDZlfDP0+pWv0yAtgni7AZ9bYKtWgIfJylNXUFfis2BxsX3lCVuZE12wtRePEfJjnG6T9CnMohEybw==","shasum":"12a07a6f50189213c3e8626c4069e28b997d01d1","tarball":"http://registry-npm.ywwl.com/camelcase-keys/download/camelcase-keys-6.0.0.tgz","fileCount":5,"unpackedSize":6283,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc/9+5CRA9TVsSAnZWagAAxUUP/2EHiLkPdI66NZExdXzA\nqX2ocJHlqqsYdH+ji4wWXQ2qbLftO7RtzuVbKkhJVMETy8EeDjP4Ie1HxtKF\noy2pFukvVGLi6klvEVGPA87fcaNts3aPwdDMGXsdgBoZ7fEa2+RGMLFXi8h0\no2FQd2VgKcFUoO/LgUwelcKZLU4n4ZfoqY/EKlOMsgB9yLoMsHTYmglZ6r42\nYkgus6Hh3EQqY2aKaIhYYbjWmenA25iwSxJs+cjYssLUK6QgEWEByJ2OGoXz\nmAQslyIwEUotN351egEVLoO+o7L/NSLSIpL0NnNib83W+9N4i5f3VKHfzpmN\ne8JjaLPhwq0uejrpwq5kxq/SYckfpD77dV5enzPLZloj4AMAlGbkNQ9hZsLf\nSqelNQvj5XlMGHuu2/9ZwEwRe0Am8E/HdLtzr0ZIZbWlLiqqEHEv90Nu3/l/\n+TNV7iJN2N2ATgYUFAI9+w8C+fJ0liHGGqdLAJ4xBjAEzkL8/0+W7Ls8YjWe\nmhM0PKgxyWOudIU/RVYL0NPqAGpk/5S+CEIutqWWGeN5uBxID5LL46KqltZ4\nWVzWSDIwndkKth7AQ4/vgeB8iCDzpDfX7KCL8ucfWWBmim7Pqzq5HrZBPn1p\n7J8Gwa4HsX8+DU0KZ5pQC79CtDGaFYTWm5VKPuoybynvx5Fv+/DIu63D9Lr2\nVM69\r\n=zGkk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDVopUrT1UT2Bw5KNklyjXVeNn3XSoOFuxpR7PF4AfqhQIgTYvvq3qX29b4A2jG0g+yxbE8Tw4LcQGT96YexA+Y2zI="}],"size":2698,"noattachment":false,"key":"/camelcase-keys/-/camelcase-keys-6.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/camelcase-keys_6.0.0_1560272824717_0.8378150855396669"},"_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":1560272824833,"_cnpm_publish_time":1560272824833,"dist-tags":{"latest":"10.0.3"}}