Skip to content

Commit

Permalink
Add change-case-of-keys (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
uladkasach committed Sep 26, 2023
1 parent 42204f8 commit 3d7700b
Show file tree
Hide file tree
Showing 10 changed files with 11,537 additions and 0 deletions.
45 changes: 45 additions & 0 deletions packages/change-case-of-keys/README.md
@@ -0,0 +1,45 @@
# Is Upper Case

[![NPM version][npm-image]][npm-url]
[![NPM downloads][downloads-image]][downloads-url]
[![Bundle size][bundlephobia-image]][bundlephobia-url]

> Transforms the keys of an object by applying a change-case function of choice on each key, recursively
## Installation

```
npm install change-case-of-keys --save
```

## Usage

```js
import { changeCaseOfKeys } from "change-case-of-keys";
import { camelCase } from 'change-case';
// or, `import { camelCase, changeCaseOfKeys } from 'change-case';

const changedObject = changeCaseOfKeys({
first_name: 'bob',
last_name: 'the builder',
credentials: [{ built_things: true }],
}, camelCase);
/*
{
firstName: 'bob',
lastName: 'the builder',
credentials: [{ builtThings: true }],
}
/*
```
## License
MIT
[npm-image]: https://img.shields.io/npm/v/change-case-of-keys.svg?style=flat
[npm-url]: https://npmjs.org/package/change-case-of-keys
[downloads-image]: https://img.shields.io/npm/dm/change-case-of-keys.svg?style=flat
[downloads-url]: https://npmjs.org/package/change-case-of-keys
[bundlephobia-image]: https://img.shields.io/bundlephobia/minzip/change-case-of-keys.svg
[bundlephobia-url]: https://bundlephobia.com/result?p=change-case-of-keys

0 comments on commit 3d7700b

Please sign in to comment.