# deep-patch-data

> Patch data with data path.

Latest version **1.0.0** (published 2022-10-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install deep-patch-data
pnpm add deep-patch-data
yarn add deep-patch-data
bun add deep-patch-data
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2022-10-25 |
| First published | 2022-10-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 26.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | gzzhanghao |

## Links

- npm: https://www.npmjs.com/package/deep-patch-data
- npm.io page: https://npm.io/package/deep-patch-data

## Recent versions

- 1.0.0 (latest) — 2022-10-25

## README

# deep-patch-data

Patch data with data path.

## Usage

```ts
import { patch } from 'deep-patch-data'

patch(object, {
  key: 'value',
  'data.path["computed member"][1]': 'deepValue'
})

/**
 * result:
 *
 * {
 *   key: 'value',
 *   data: {
 *     path: {
 *       'computed member': [
 *         ,
 *         'deepValue'
 *       ]
 *     }
 *   }
 * }
 */
```

## Options

### protectedKeys: string[]

Prevent specific keys from being overwritten.

### set: Function

Custom setter function.

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