Files
react-native-devtools-frontend/node_modules/decamelize-keys/readme.md
T
Mathias Bynens 79e2cf0633 Add stylelint dependency
This also adds CC-BY-4.0 to the list of accepted licenses.

DISABLE_THIRD_PARTY_CHECK=update dependencies

Bug: chromium:1083142
Change-Id: I8612de2fba52dae32eeb71af79d5aacfde52142b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2220097
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2020-06-11 06:20:04 +00:00

70 lines
1.2 KiB
Markdown

# decamelize-keys [![Build Status](https://travis-ci.org/dsblv/decamelize-keys.svg?branch=master)](https://travis-ci.org/dsblv/decamelize-keys)
> Convert object keys from camelCase to lowercase with a custom separator using [`decamelize`](https://github.com/sindresorhus/decamelize)
*This project was forked from [`camelcase-keys`](https://github.com/sindresorhus/camelcase-keys) and converted to do the opposite*
## Install
```sh
$ npm install --save decamelize-keys
```
## Usage
```js
const decamelizeKeys = require('decamelize-keys');
decamelizeKeys({fooBar: true}, '-');
//=> {'foo-bar': true}
```
## API
### decamelizeKeys(input, [separator], [options])
### input
Type: `object`
*Required*
Object to decamelize.
### separator
Type: `string`
Default: `_`
A string to insert between words.
### options
Type: `object`
#### separator
Type: `string`
Default: `_`
Alternative way to specify [separator](#separator).
#### exclude
Type: `array`
Default: `[]`
Exclude keys from being decamelized.
## Related
See [`camelcase-keys`](https://github.com/sindresorhus/camelcase-keys) for the inverse.
## License
MIT © [Sindre Sorhus](http://sindresorhus.com), [Dmirty Sobolev](https://github.com/dsblv)