declare namespace camelcaseKeys { interface Options { /** Recurse nested objects and objects in arrays. @default false */ readonly deep?: boolean; /** Exclude keys from being camel-cased. @default [] */ readonly exclude?: ReadonlyArray; /** Exclude children at the given object paths in dot-notation from being camel-cased. For example, with an object like `{a: {b: '🦄'}}`, the object path to reach the unicorn is `'a.b'`. @default [] @example ``` camelcaseKeys({ a_b: 1, a_c: { c_d: 1, c_e: { e_f: 1 } } }, { deep: true, stopPaths: [ 'a_c.c_e' ] }), // { // aB: 1, // aC: { // cD: 1, // cE: { // e_f: 1 // } // } // } ``` */ readonly stopPaths?: ReadonlyArray; /** Uppercase the first character as in `bye-bye` → `ByeBye`. @default false */ readonly pascalCase?: boolean; } } /** Convert object keys to camel case using [`camelcase`](https://github.com/sindresorhus/camelcase). @param input - Object or array of objects to camel-case. @example ``` import camelcaseKeys = require('camelcase-keys'); // Convert an object camelcaseKeys({'foo-bar': true}); //=> {fooBar: true} // Convert an array of objects camelcaseKeys([{'foo-bar': true}, {'bar-foo': false}]); //=> [{fooBar: true}, {barFoo: false}] camelcaseKeys({'foo-bar': true, nested: {unicorn_rainbow: true}}, {deep: true}); //=> {fooBar: true, nested: {unicornRainbow: true}} // Convert object keys to pascal case camelcaseKeys({'foo-bar': true, nested: {unicorn_rainbow: true}}, {deep: true, pascalCase: true}); //=> {FooBar: true, Nested: {UnicornRainbow: true}} import minimist = require('minimist'); const argv = minimist(process.argv.slice(2)); //=> {_: [], 'foo-bar': true} camelcaseKeys(argv); //=> {_: [], fooBar: true} ``` */ declare function camelcaseKeys>( input: T, options?: camelcaseKeys.Options, ): T; declare function camelcaseKeys( input: T, options?: camelcaseKeys.Options, ): T; export = camelcaseKeys;