dot-property

0.0.1 • Public • Published

node-dot-property

get/set/remove/has for any object using dot-notation path with reasonable defaults.


Travis-CI Build Status Codecov branch Codacy Badge

Dev Dependencies

JavaScript Style Guide


"API"

set (obj, path, val)

Set val at path of obj. Will create last entry of path if it does not exist.


get (obj, path)

Get val at path of obj. Will return undefined for a nonexistent path.


has (obj, path)

Check if obj has a val at path. Will return false for a nonexistent path.


remove (obj, path)

Remove val at path of obj. Will do nothing for a nonexistent path.


obj is the Object, path is the dot-notation path to a property, and val is the value to set for the property.

Readme

Keywords

none

Package Sidebar

Install

npm i dot-property

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

98.4 kB

Total Files

7

Last publish

Collaborators

  • l3l_aze