# @vill-v/path-prop

> 一个基于路径字符串对对象进行操作的工具

Latest version **2.0.1** (published 2025-06-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install @vill-v/path-prop
pnpm add @vill-v/path-prop
yarn add @vill-v/path-prop
bun add @vill-v/path-prop
```

## Health

**Score 40/100 (D)** — status: maintenance-mode.

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

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2025-06-27 |
| First published | 2022-05-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 12.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | whitekite |
| Maintainers | whitekite |

## Links

- npm: https://www.npmjs.com/package/@vill-v/path-prop
- Repository: https://github.com/vill-v-kit/path-prop
- Homepage: https://vill-v-kit.github.io/vill-v/
- Issues: https://github.com/vill-v-kit/path-prop/issues
- npm.io page: https://npm.io/package/@vill-v/path-prop

## Dependencies (1)

- [@vill-v/type-as](https://npm.io/package/@vill-v/type-as.md) ^2.0.1

## Recent versions

- 2.0.1 (latest) — 2025-06-27
- 2.0.0 — 2025-06-27
- 1.3.3 — 2024-10-23
- 1.3.2 — 2024-09-27
- 1.3.1 — 2024-05-03
- 1.3.0 — 2023-08-20
- 1.2.5 — 2023-07-10
- 1.2.4 — 2023-07-10
- 1.2.3 — 2023-07-10
- 1.2.2 — 2023-02-08
- 1.2.0 — 2023-01-12
- 1.1.3 — 2022-12-05
- 1.1.2 — 2022-12-01
- 1.1.1 — 2022-11-17
- 1.1.0 — 2022-11-07
- … 19 more at https://npm.io/package/@vill-v/path-prop/versions

## README

# @vill-v/path-prop

neta了崩坏3 往世乐土的英杰维尔薇

<!-- automd:badges color="orange" license licenseBranch  bundlephobia packagephobia -->

[![npm version](https://img.shields.io/npm/v/@vill-v/path-prop?color=orange)](https://npmjs.com/package/@vill-v/path-prop)
[![npm downloads](https://img.shields.io/npm/dm/@vill-v/path-prop?color=orange)](https://npm.chart.dev/@vill-v/path-prop)
[![bundle size](https://img.shields.io/bundlephobia/minzip/@vill-v/path-prop?color=orange)](https://bundlephobia.com/package/@vill-v/path-prop)
[![install size](https://badgen.net/packagephobia/install/@vill-v/path-prop?color=orange)](https://packagephobia.com/result?p=@vill-v/path-prop)
[![license](https://img.shields.io/github/license/vill-v-kit/path-prop?color=orange)](https://github.com/vill-v-kit/path-prop/blob/true/LICENSE)

<!-- /automd -->

**一个基于路径字符串对对象进行操作的工具**

## 安装
<!-- automd:pm-install -->

```sh
# ✨ Auto-detect
npx nypm install @vill-v/path-prop

# npm
npm install @vill-v/path-prop

# yarn
yarn add @vill-v/path-prop

# pnpm
pnpm install @vill-v/path-prop

# bun
bun install @vill-v/path-prop

# deno
deno install @vill-v/path-prop
```

<!-- /automd -->

## 说明

_只是个人项目，整体较为随便，作为开发途中的经验总结，如有相似的需求，推荐copy或阅读源码，不建议将该包在实际项目中使用_

**如有幸被实际使用在项目内，不胜荣幸**

```ts

const obj = {test: [{test1: 'test2'}]}

getByPath(obj, 'test[0].test1')
// -> test2

const obj1 = {test: [{test1: 'test2'}]}

setByPath(obj1, 'test[0].test1', 'test3')
// obj -> {test: [{test1: 'test3'}]}

const obj2 = {test: [{test1: 'test2'}]}

delByPath(obj2, 'test[0]')

// obj -> {test: []}

const obj3 = {test: [{test1: 'test2'}]}

hasByPath(obj3, 'test[0].test1')
// -> true
```

<!-- automd:contributors author="Colourlessglow" license="MIT" -->

Published under the [MIT](https://github.com/vill-v-kit/path-prop/blob/main/LICENSE) license.
Made by [@Colourlessglow](https://github.com/Colourlessglow) and [community](https://github.com/vill-v-kit/path-prop/graphs/contributors) 💛
<br><br>
<a href="https://github.com/vill-v-kit/path-prop/graphs/contributors">
<img src="https://contrib.rocks/image?repo=vill-v-kit/path-prop" />
</a>

<!-- /automd -->

<!-- automd:with-automd -->

---

_🤖 auto updated with [automd](https://automd.unjs.io)_

<!-- /automd -->

---
_Source: https://npm.io/package/@vill-v/path-prop · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
