# paramcase-keys

> Convert object keys to paramCase

Latest version **0.1.0** (published 2018-11-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install paramcase-keys
pnpm add paramcase-keys
yarn add paramcase-keys
bun add paramcase-keys
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2018-11-06 |
| First published | 2018-11-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 3 |
| Unpacked size | 3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Alex Luong |
| Maintainers | alexluong |
| Keywords | map, obj, object, key, keys, value, values, val, iterate, paramcase, param-case, case, dash, hyphen, separator, string, text, convert, deep, recurse, recursive |

## Links

- npm: https://www.npmjs.com/package/paramcase-keys
- Repository: https://github.com/alexluong/paramcase-keys
- Homepage: https://github.com/alexluong/paramcase-keys#readme
- Issues: https://github.com/alexluong/paramcase-keys/issues
- npm.io page: https://npm.io/package/paramcase-keys

## Dependencies (3)

- [map-obj](https://npm.io/package/map-obj.md) ^3.0.0
- [quick-lru](https://npm.io/package/quick-lru.md) ^1.1.0
- [param-case](https://npm.io/package/param-case.md) ^2.1.1

## Alternatives

- [@mce/gif](https://npm.io/package/@mce/gif.md) — 2.6K weekly downloads
- [cleanse](https://npm.io/package/cleanse.md) — 173 weekly downloads
- [str](https://npm.io/package/str.md) — 127 weekly downloads
- [naming](https://npm.io/package/naming.md) — 95 weekly downloads
- [tap-telco-api](https://npm.io/package/tap-telco-api.md) — 19 weekly downloads

## Recent versions

- 0.1.0 (latest) — 2018-11-06

## README

# paramcase-keys

> Convert object keys to paramCase using [`param-case`](https://github.com/blakeembrey/param-case)

## Install

```
$ npm install paramcase-keys
```

## Usage

```js
const paramcaseKeys = require("paramcase-keys")

// Convert an object
paramcaseKeys({ fooBar: true })
//=> { "foo-bar": true }

// Convert an array of objects
paramcaseKeys([{ fooBar: true }, { barFoo: false }])
//=> [{ "foo-bar": true }, { "bar-foo": false }]

paramcaseKeys({ fooBar: true, nested: { unicorn_rainbow: true } }, { deep: true })
//=> { "foo-bar": true, nested: { "unicorn-rainbow": true } }
```

## API

### paramcaseKeys(input, [options])

#### input

Type: `Object` `Object[]`

Object or array of objects to paramCase.

#### options

Type: `Object`

##### exclude

Type: `Array<string|RegExp>`<br>
Default: `[]`

Exclude keys from being paramCased.

##### deep

Type: `boolean`<br>
Default: `false`

Recurse nested objects and objects in arrays.

## Related

- [camelcase-keys](https://github.com/sindresorhus/camelcase-keys)
- [snakecase-keys](https://github.com/bendrucker/snakecase-keys)

## License

MIT

---
_Source: https://npm.io/package/paramcase-keys · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
