# transform-prop-names-fast

> Transform the case of object property names

Latest version **1.0.1** (published 2022-01-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install transform-prop-names-fast
pnpm add transform-prop-names-fast
yarn add transform-prop-names-fast
bun add transform-prop-names-fast
```

## 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.0.1 |
| Published | 2022-01-11 |
| First published | 2022-01-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Philippe Masset |
| Maintainers | unspentio |

## Links

- npm: https://www.npmjs.com/package/transform-prop-names-fast
- Repository: https://github.com/onsails/transform-prop-names
- Homepage: https://github.com/onsails/transform-prop-names#readme
- Issues: https://github.com/onsails/transform-prop-names/issues
- npm.io page: https://npm.io/package/transform-prop-names-fast

## Dependencies (1)

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

## Recent versions

- 1.0.1 (latest) — 2022-01-11
- 1.0.0 — 2022-01-11

## README

# Transform the case of object property names

[![NPM Version][npm-image]][npm-url]

Transform objects so that all property names are `camelCased` or `snake_cased`.
Accepts objects and arrays of objects, of any shape and depth.

Example:

```js
import { toCamelCasePropertyNames } from 'transform-prop-names';

const snakeCasedData = { user_id: 1, name: 'John', avatar_url: null };

toCamelCasePropertyNames(snakeCasedData);
//=> { userId: 1, name: 'John', avatarUrl: null }
```

## API

### `toCamelCasePropertyNames(value)`

Make all property names `camelCased`.

- `value` - object, array of objects

- Returns: The same object or array of objects will be returned, with all
  property names camel-cased.

### `toSnakeCasePropertyNames(value)`

Make all property names `snake_cased`.

- `value` - object, array of objects

- Returns: The same object or array of objects will be returned, with all
  property names snake-cased.

## Contributing

Contributions are indeed welcome. Feel free to open a PR, and make sure to run
`npm run test` and `npm run lint` while doing so!

[npm-image]: https://img.shields.io/npm/v/transform-prop-names.svg
[npm-url]: https://npmjs.org/package/transform-prop-names

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