You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

readme.md 847B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # camelcase-keys [![Build Status](https://travis-ci.org/sindresorhus/camelcase-keys.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase-keys)
  2. > Convert object keys to camelCase using [`camelcase`](https://github.com/sindresorhus/camelcase)
  3. ## Install
  4. ```
  5. $ npm install --save camelcase-keys
  6. ```
  7. ## Usage
  8. ```js
  9. const camelcaseKeys = require('camelcase-keys');
  10. camelcaseKeys({'foo-bar': true});
  11. //=> {fooBar: true}
  12. const argv = require('minimist')(process.argv.slice(2));
  13. //=> {_: [], 'foo-bar': true}
  14. camelcaseKeys(argv);
  15. //=> {_: [], fooBar: true}
  16. ```
  17. ## API
  18. ### camelcaseKeys(input, [options])
  19. #### input
  20. Type: `object`
  21. Object to camelCase.
  22. #### options
  23. Type: `object`
  24. ##### exclude
  25. Type: `array`
  26. Default: `[]`
  27. Exclude keys from being camelCased.
  28. ## License
  29. MIT © [Sindre Sorhus](http://sindresorhus.com)