# easy-object-conv

> Use to convert objects keys in 🐪 camel case to 🐍 snake case or underscore and in the same way as snake case to camel case.

Latest version **1.2.1** (published 2022-01-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install easy-object-conv
pnpm add easy-object-conv
yarn add easy-object-conv
bun add easy-object-conv
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2022-01-30 |
| First published | 2022-01-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | dotbruu |
| Maintainers | dotbruno |
| Keywords | snake, camel, case, underscore, object, convert, snake-case, camel-case, underscore-case, convert-object-snake-case-to-camel-case, convert-object-camel-case-to-snake-case |

## Links

- npm: https://www.npmjs.com/package/easy-object-conv
- Repository: https://github.com/dotbruu/easy-object-conv
- Homepage: https://github.com/dotbruu/easy-object-conv#readme
- Issues: https://github.com/dotbruu/easy-object-conv/issues
- npm.io page: https://npm.io/package/easy-object-conv

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

- 1.2.1 (latest) — 2022-01-30
- 1.2.0 — 2022-01-30
- 1.0.1 — 2022-01-28
- 1.0.0 — 2022-01-28

## README

# <center> ⚙️ Easy Object Keys Converter </center>

<center> Use to convert objects keys in 🐪 camel case to 🐍 snake case or underscore and in the same way as snake case to camel case. </center>

### Installation

#### npm

```sh
  npm i easy-object-conv
```

#### yarn

```sh
  yarn add easy-object-conv
```

## 💻 Usage

### Camel Case to Snake Case (underscore)

```sh
  import { camelToSnake } from "easy-object-conv"
  ...
  camelToSnake(object)
  ...
```

#### Input

```sh
  {
    id: 1,
    fieldOne: Bruno,
    fieldTwo: {
      fieldThree: Hello,
      fieldFour: World
    }
  }
```

#### Output

```sh
  {
    id: 1,
    field_one: Bruno,
    field_two: {
      field_three: Hello,
      field_four: World
    }
  }
```

### Snake Case (underscore) to Camel Case

```sh
  import { snakeToCamel } from "easy-object-conv"
  ...
  snakeToCamel(object)
  ...
```

#### Input

```sh
  {
    id: 1,
    field_one: Bruno,
    field_two: {
      field_three: Hello,
      field_four: World
    }
  }
```

#### Output

```sh
  {
    id: 1,
    fieldOne: Bruno,
    fieldTwo: {
      fieldThree: Hello,
      fieldFour: World
    }
  }
```

#### Thank You for Use! 🧑🏻‍💻

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