mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 04:49:15 +08:00
11 lines
311 B
TypeScript
11 lines
311 B
TypeScript
import camelcaseKeys = require('camelcase-keys');
|
|
|
|
camelcaseKeys({'foo-bar': true});
|
|
// => {fooBar: true}
|
|
|
|
camelcaseKeys({'foo-bar': true, nested: {unicorn_rainbow: true}}, {deep: true});
|
|
// => {fooBar: true, nested: {unicornRainbow: true}}
|
|
|
|
camelcaseKeys({_: [], 'foo-bar': true});
|
|
// => {_: [], fooBar: true}
|