# @badass-team-code/formatted-cases-words

> Snake and camel case formatter

Latest version **1.0.0** (published 2021-10-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @badass-team-code/formatted-cases-words
pnpm add @badass-team-code/formatted-cases-words
yarn add @badass-team-code/formatted-cases-words
bun add @badass-team-code/formatted-cases-words
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2021-10-07 |
| First published | 2021-09-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 16 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Lucas Santos, Jean Cigoli e Davi Soares |
| Maintainers | badass-team, jeancigoli, lucassm02 |
| Keywords | snake, camel, snakecase, camelcase, camel-case, snake-case, convert, text, string, underscore, separator |

## Links

- npm: https://www.npmjs.com/package/@badass-team-code/formatted-cases-words
- Repository: https://github.com/badassteamcode/formatted-cases-words
- Homepage: https://github.com/badassteamcode/formatted-cases-words#readme
- Issues: https://github.com/badassteamcode/formatted-cases-words/issues
- npm.io page: https://npm.io/package/@badass-team-code/formatted-cases-words

## 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.0.0 (latest) — 2021-10-07
- 0.0.2 — 2021-09-21
- 0.0.1 — 2021-09-21

## README

# Snake and camel case formatter

## Installation

This is a **Node.js** module available through the [npm registry](https://www.npmjs.com/).

Before installing, [download and install Node.js](https://nodejs.org/en/download/).

Installation is done using the **npm install command**:

```prompt
npm install @badass-team-code/formatted-cases-words
```

Or using the yarn:

```prompt
yarn add @badass-team-code/formatted-cases-words
```

## Quick Start

After installation, import the functions for formats which currently are: **formateCamelCaseKeysForSnakeCase** and **formateSnakeCaseKeysForCamelCase**

```js
import {
  formateCamelCaseKeysForSnakeCase,
  formateSnakeCaseKeysForCamelCase,
} from "@baddas-team/formatted-cases-words";
```

## Examples

By passing the following json to the formatting function:

```js
const json = formateCamelCaseKeysForSnakeCase({
  messageText: "Example",
  dateText: new Date(),
  array: [
    {
      arrayText: "",
    },
  ],
});
```

The result is:

```json
{
  "message_text": "Example",
  "date_text": "2021-09-20T23:40:43.381Z",
  "array": [{ "array_text": "" }]
}
```

Now when using the reverse:

```js
const json = formateSnakeCaseKeysForCamelCase({
  message_text: "Example",
  date_text: new Date(),
  array: [{ array_text: "" }],
});
```

The result is:

```json
{
  "messageText": "Example",
  "dateText": "2021-09-20T23:41:58.766Z",
  "array": [{ "arrayText": "" }]
}
```

---
_Source: https://npm.io/package/@badass-team-code/formatted-cases-words · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
