# obj-case

> Work with objects of different cased keys

Latest version **0.2.1** (published 2021-05-25) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2021-05-25 |
| First published | 2013-08-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 13.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Segmentio |
| Maintainers | segmentio, segment-admin |
| Keywords | object, case, casing, camelcase |

## Links

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

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

- 0.2.1 (latest) — 2021-05-25
- 0.2.0 — 2014-12-15
- 0.1.1 — 2014-09-09
- 0.1.0 — 2014-09-02
- 0.0.11 — 2014-08-30
- 0.0.10 — 2014-08-30
- 0.0.9 — 2014-08-30
- 0.0.8 — 2014-08-30
- 0.0.7 — 2014-06-13
- 0.0.6 — 2014-02-12
- 0.0.5 — 2013-12-19
- 0.0.3 — 2013-12-18
- 0.0.1 — 2013-08-24

## README

# obj-case

> **Note**  
> Segment has paused maintenance on this project, but may return it to an active status in the future. Issues and pull requests from external contributors are not being considered, although internal contributions may appear from time to time. The project remains available under its open source license for anyone to use.

  Work with objects of different cased keys. Anything supported by [nbubna/Case](https://github.com/nbubna/Case). Makes finding and editing objects between languages a little more forgiving while still not modifying the original JSON.

  [![Build Status](https://travis-ci.org/segmentio/obj-case.png?branch=master)](https://travis-ci.org/segmentio/facade)

## Installation

  Install with [component(1)](http://component.io):

    $ component install segmentio/obj-case

## API


### .find(obj, key)

  Returns the value for the object with the given key

  ```javascript
  var obj = { my : { super_cool : { climbingShoes : 'x' }}};
  objCase.find(obj, 'my.superCool.CLIMBING SHOES');  // 'x'
  ```

### .del(obj, key, val, [options])

  Deletes a nested key

  ```javascript
  var obj = { 'a wild' : { mouse : { APPEARED : true }}};
  objCase.del(obj, 'aWild.mouse.appeared');
  console.log(obj); // { 'a wild' : { mouse : {} }}
  ```


### .replace(obj, key, val, [options])

  Replaces a nested key's value

  ```javascript
  var obj = { replacing : { keys : 'is the best' }};
  objCase.replace(obj, 'replacing.keys', 'is just okay');
  console.log(obj) // { replacing : { keys : 'is just okay' }}
  ```


## License

  MIT

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