Migration notice: users of deep-props <= v0.0.8 must replace module calls with deep-props.extract. See the deployment instructions below or install the deep-props.extract standalone package. All other functionality is the same.
Provides a collection of non-recursive tools for performing operations on deeply nested object properties and prototypes. Allows for custom execution settings including non-native dataset handling.
[![NPM](https://nodei.co/npm/deep-props.extract.png?mini=true)](https://nodei.co/npm/deep-props.extract/) + Non-recursively creates an array of deep paths and properties within an object. Optionally unpacks prototypes and non-enumerable property descriptors. Supports Objects, Arrays, Maps, and Sets.
[![NPM](https://nodei.co/npm/deep-props.get.png?mini=true)](https://nodei.co/npm/deep-props.get/) + Retrieves a nested property from a data source. Supports Objects, Arrays, Maps, Sets, WeakMaps, WeakSets, and JSON. Supports the use of a custom extraction function to handle unsupported datasets.
[![NPM](https://nodei.co/npm/deep-props.set.png?mini=true)](https://nodei.co/npm/deep-props.set/) + Sets values within nested objects; creates structure if not found. Supports setting within Objects, Arrays, Maps, Sets, WeakMaps, and WeakSets; supports creation of Objects, Arrays, and Maps.
PrerequisitesNode.JS version 8.7.0 or above.
InstallingInstalling all modules:
npm install deep-props
Submodules may be installed individually. See the module list above.
TestingThe following command will test the package for errors. It prints a selection of examples to the console; scroll through its output if you want to learn more about the utility.
npm test --prefix /path/to/node_modules/deep-props
const props = require('deep-props') const extract = props.extract const get = props.get const set = props.set
DocumentationPlease see the associated README files for general usage information.
API docs contain module parameters and return information. Links to type definitions are provided as well in order to explain in detail the types of expected inputs and outputs.
Global docs contain all type definitions and functions used internally.