Go to file
GitLab Runner 18bd65bae2 Auto COMMIT for build : 76 \n commit by: Administrator <gitlab_admin_873017@example.com> \n with message : remove sudo 2025-04-07 16:54:54 +02:00
README.md Auto COMMIT for build : 76 \n commit by: Administrator <gitlab_admin_873017@example.com> \n with message : remove sudo 2025-04-07 16:54:54 +02:00
index.js Auto COMMIT for build : 76 \n commit by: Administrator <gitlab_admin_873017@example.com> \n with message : remove sudo 2025-04-07 16:54:54 +02:00
package.json Auto COMMIT for build : 76 \n commit by: Administrator <gitlab_admin_873017@example.com> \n with message : remove sudo 2025-04-07 16:54:54 +02:00

README.md

@D3v4pp/dot

GitHub license npm version Get and set object properties with dot notation

Installation

$ npm install @d3v4pp/dot

API

dot.set(object, path, value)

dot.set(obj, 'cool.aid', 'rocks');
assert(obj.cool.aid === 'rocks');

dot.get(object, path)

var value = dot.get(obj, 'cool.aid');
assert(value === 'rocks');

dot.delete(object, path)

var value = dot.delete(obj, 'cool.aid');
assert(!obj.cool.hasOwnProperty('aid'));