# keysto

> Node library to transform object keys to another format

Latest version **1.2.1** (published 2023-07-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install keysto
pnpm add keysto
yarn add keysto
bun add keysto
```

## 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 | 1.2.1 |
| Published | 2023-07-02 |
| First published | 2019-10-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 11 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Arif Setyawan |
| Maintainers | ariflogic |
| Keywords | transform, key, object |

## Links

- npm: https://www.npmjs.com/package/keysto
- Repository: https://github.com/arifsetyawan/keysto
- Homepage: https://github.com/arifsetyawan/keysto#readme
- Issues: https://github.com/arifsetyawan/keysto/issues
- npm.io page: https://npm.io/package/keysto

## Dependencies (1)

- [case](https://npm.io/package/case.md) ^1.6.2

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.2.1 (latest) — 2023-07-02
- 1.2.0 — 2023-07-02
- 1.1.1 — 2019-10-05
- 1.1.0 — 2019-10-05
- 1.0.5 — 2019-10-05
- 1.0.4 — 2019-10-05
- 1.0.3 — 2019-10-05
- 1.0.2 — 2019-10-05
- 1.0.1 — 2019-10-05
- 1.0.0 — 2019-10-05

## README

# keysto

is a humble library to transform javascript object `key`. 

currently supported transformation 
- snake case <--> camel case
- camel case <--> snake case

### Instalation :
```
npm install keysto
```

### Available Function :
- `.toSnakeCase()`
- `.toCamelCase()`

### Usage :
```
const keysTo = require('keysto');

let targetObj = { firstName: "Jhon", lastName: "Doe" };
let newObj = keysTo.setKey(targetObj).toSnakeCase();

console.log(newObj); 
// expected : 
// { first_name: "Jhon", last_name: "Doe" }

```

this keysto also work for array of object and deep nested object. example

```
let targetArrayOfObj = [
  { firstName: "Jhon", lastName: "Doe" },
  { firstName: "Jane", lastName: "Doe" };
];
let newObj = keysTo.setKey(targetArrayOfObj).toSnakeCase();

console.log(newObj); 
// expected: 
// [
//     { first_name: "Jhon", last_name: "Doe" },
//     { first_name: "Jane", last_name: "Doe" }
// ]

```

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