# change-case-object

> Changes the case of all keys of an object

Latest version **2.0.0** (published 2016-01-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install change-case-object
pnpm add change-case-object
yarn add change-case-object
bun add change-case-object
```

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2016-01-04 |
| First published | 2015-11-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/change-case-object) |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Johannes Stein |
| Maintainers | stoney |
| Keywords | camel, object, case, change, snake, param |

## Links

- npm: https://www.npmjs.com/package/change-case-object
- Repository: https://github.com/BinaryThumb/change-case-object
- Homepage: https://github.com/BinaryThumb/change-case-object#readme
- Issues: https://github.com/BinaryThumb/change-case-object/issues
- npm.io page: https://npm.io/package/change-case-object

## Dependencies (3)

- [camel-case](https://npm.io/package/camel-case.md) ^1.2.0
- [param-case](https://npm.io/package/param-case.md) ^1.1.1
- [snake-case](https://npm.io/package/snake-case.md) ^1.1.1

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

- 2.0.0 (latest) — 2016-01-04
- 1.1.1 — 2015-12-14
- 1.1.0 — 2015-12-14
- 1.0.0 — 2015-11-30

## README

# change-case-object

[![Build Status](https://travis-ci.org/BinaryThumb/change-case-object.svg?branch=master)](https://travis-ci.org/BinaryThumb/change-case-object)
[![Dependency Status](https://david-dm.org/BinaryThumb/change-case-object.svg)](https://david-dm.org/BinaryThumb/change-case-object)
[![devDependency Status](https://david-dm.org/BinaryThumb/change-case-object/dev-status.svg)](https://david-dm.org/BinaryThumb/change-case-object#info=devDependencies)
[![Coverage Status](https://coveralls.io/repos/BinaryThumb/change-case-object/badge.svg?branch=master&service=github)](https://coveralls.io/github/BinaryThumb/change-case-object?branch=master)
[![Code Climate](https://codeclimate.com/github/BinaryThumb/change-case-object/badges/gpa.svg)](https://codeclimate.com/github/BinaryThumb/change-case-object)

Changes the case of all keys in an object or array. In its simplest form it also changes the key itself if a string is passed in.

## Installation

`npm install change-case-object`
Currently, only CommonJS environments are supported. (This means Node.js and browser with `browserify` or `webpack`)

## Example

```javascript
var changeCaseObject = require('change-case-object');

var myObject = {
  hello_world: 'hi',
};

var newObject = changeCaseObject.camelCase(myObject);
// {helloWorld: 'hi'}
```

## Methods
All methods are available under the `changeCaseObject` object after the module has been required.

### .camelCase
Conerts all object keys into camel case.  
`hello_world -> helloWorld`

### .snakeCase
Conerts all object keys into snake case.  
`helloWorld -> hello_world`

### .paramCase
Conerts all object keys into param case.  
`helloWorld -> hello-world`

Shorthand methods are also available:
```
.camelCase -> .camel
.snakeCase -> .snake
.paramCase -> .param
```

## Code Guideline
AirBnB ES5

## License
MIT

## Changelog
2.0.0 Object values are no longer being transformed by default
1.1.1 Stricter checking for code guideline  
1.1.0 Add support for arrays and primitives  
1.0.0 Initial version

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