# camelify-recursive

> Recursively convert an API response to camelCase

Latest version **2.0.5** (published 2019-11-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install camelify-recursive
pnpm add camelify-recursive
yarn add camelify-recursive
bun add camelify-recursive
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.5 |
| Published | 2019-11-14 |
| First published | 2015-04-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Mike MacCana |
| Maintainers | mikemaccana |
| Keywords | camelCase, underscore, API, response, REST, snakecase, case |

## Links

- npm: https://www.npmjs.com/package/camelify-recursive
- Repository: https://github.com/mikemaccana/camelify-recursive
- Homepage: https://github.com/mikemaccana/camelify-recursive#readme
- Issues: https://github.com/mikemaccana/camelify-recursive/issues
- npm.io page: https://npm.io/package/camelify-recursive

## 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

- 2.0.5 (latest) — 2019-11-14
- 2.0.4 — 2019-11-12
- 2.0.3 — 2019-11-12
- 2.0.2 — 2019-11-12
- 2.0.1 — 2019-11-12
- 2.0.0 — 2019-11-12
- 1.2.0 — 2017-04-18
- 1.0.1 — 2015-04-17
- 1.0.0 — 2015-04-17

## README

# Recursively convert API responses to camelCase

Have an API response that doesn't use JavaScript-style casing?

Want to be able to use the data in the response without having to fix the case all the time?

Let camelify do the work.

Cwmelify-recursive will **recursively** convert all the keys in the object to camelCase, so you can use those keys directly in your JavaScript (or JSON database) and not have to worry about converting things manually all the time.

The word `ID` will always be in uppercase as you'd expect.

## Before

```javascript
{
  api_version: "0.3.2",
  results: {
    page: 1,
    per_page: 30,
    id: 123456,
    banana_id: 123,
    total_pages: 1,
    total_count: 0,
    filings: []
  }
};
```

## After

```javascript
{
  apiVersion: "0.3.2",
  results: {
    page: 1,
    perPage: 30,
    ID: 123456,
    bananaID: 123,
    totalPages: 1,
    totalCount: 0,
    filings: []
  }
};
```

## Usage

Just:

```javascript
const camelify = require('camelify-recursive')
```

Then, to fix the object `someObject`

```javascript
someObject = camelify(someObject)
```

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