# case-formatter

> Simple converters from case to case for string and Record. It can canvert below cases each other.

Latest version **1.1.2** (published 2021-04-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install case-formatter
pnpm add case-formatter
yarn add case-formatter
bun add case-formatter
```

## 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.1.2 |
| Published | 2021-04-07 |
| First published | 2019-05-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | 6bou |
| Keywords | string, text, formatter, camel, snake, pascal, kebab, case |

## Links

- npm: https://www.npmjs.com/package/case-formatter
- Repository: https://github.com/6bou/case-formatter
- Homepage: https://github.com/6bou/case-formatter#readme
- Issues: https://github.com/6bou/case-formatter/issues
- npm.io page: https://npm.io/package/case-formatter

## 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.1.2 (latest) — 2021-04-07
- 1.1.0 (case-formatter@1.1.0) — 2021-04-07
- 1.1.1 — 2021-04-07
- 1.0.9 — 2019-06-06
- 1.0.8 — 2019-05-21
- 1.0.7 — 2019-05-21
- 1.0.6 — 2019-05-20
- 1.0.5 — 2019-05-20
- 1.0.4 — 2019-05-20
- 1.0.3 — 2019-05-20
- 1.0.2 — 2019-05-20
- 1.0.1 — 2019-05-20
- 1.0.0 — 2019-05-20

## README

# case-formatter-js

Simple converters from case to case for string and Record.
It can canvert below cases each other.

- camel
- snake
- kebab
- pascal

## Usage

```
import caseFormatter from 'case-formatter';

caseFormatter.snakeToCamel('sample_text');
// => sampleText: string
caseFormatter.snakeToCamel({ sample_text: 123 });
// => { sampleText: 123 }: Record<string, unknown>
caseFormatter.snakeToCamel<{sampleText: number}>({ sample_text: 123 });
// => { sampleText: 123 }: {sampleText: number}
```

## Formatters

- camelToSnake
- camelToPascal
- camelToKebab
- snakeToCamel
- snakeToPascal
- snakeToKebab
- pascalToCamel
- pascalToSnake
- pascalToKebab
- kebabToCamel
- kebabToSnake
- kebabToPascal

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