ayoub d3fecec507 Auto COMMIT for build : 7193 \n commit by: a.hassani <hassani.ayoub@gmail.com> \n with message : update README.md | 1 year ago | |
---|---|---|
README.md | 1 year ago | |
index.js | 1 year ago | |
package.json | 1 year ago |
Get and set object properties with dot notation
$ npm install @d3v4pp/dot
dot.set(obj, 'cool.aid', 'rocks');
assert(obj.cool.aid === 'rocks');
var value = dot.get(obj, 'cool.aid');
assert(value === 'rocks');
var value = dot.delete(obj, 'cool.aid');
assert(!obj.cool.hasOwnProperty('aid'));