API Reference

dot-prop

This avoids the overhead of parsing string paths. {name: 'Alice', role: 'admin'}, {name: 'Bob', role: 'user'} ] }; // Using array paths - no parsing…

Official Documentation ↗
CompatibilityThis documentation covers version v9.0.0. Check the official docs for the latest API surface.

Installation

npmnpm install dot-prop
pnpmpnpm add dot-prop

Methods

Overview

This avoids the overhead of parsing string paths. {name: ‘Alice’, role: ‘admin’}, {name: ‘Bob’, role: ‘user’} ] }; // Using array paths - no parsing overhead getProperty(object, [‘users’, 0, ‘name’]); //= ‘Alice’ setProperty(object, [‘users’, 1, ‘role’], ‘moderator’); console.log(object.u

API reference status

This page lists only entry points that appear verbatim in the official README examples: getProperty, setProperty, parsePath, stringifyPath. Parameter and return types are not given by the official README, so signatures are marked unverified.

Errors

The following points are quoted verbatim from the official documentation. 来源:https://cdn.jsdelivr.net/gh/sindresorhus/dot-prop@latest/readme.md · 取证方式:HTTP GET 官方 README/文档页(HTML 去标签) · 抓取时间:2026-11-07T13:49:16.190Z. Any error type, throw condition or recovery step not stated there is left unspecified; this page does not infer exception classes or return values.

Security notes

Quoted verbatim from the official documentation; this is not a complete threat model. 来源:https://cdn.jsdelivr.net/gh/sindresorhus/dot-prop@latest/readme.md · 取证方式:HTTP GET 官方 README/文档页(HTML 去标签) · 抓取时间:2026-11-07T13:49:16.190Z.

Verification notes

FAQ

What does dot-prop do?
This avoids the overhead of parsing string paths.
How do I install dot-prop?
Run `npm install dot-prop`.
Where can I verify the API details?
Official repository/documentation: https://github.com/sindresorhus/dot-prop. Checked on 2026-11-04; signatures and return values not stated in the official README are marked unverified.