npm.io
1.2.2 • Published 4 years ago

edit-nested-object

Licence
MIT
Version
1.2.2
Deps
0
Size
6 kB
Vulns
0
Weekly
0

Installations

npm i edit-nested-object

What ?

With this module you can edit nested object with keys like "name.first" etc

How ?

const editObject = require('edit-nested-object');

// import editObject from "./" // for typescript

const ob = {
    name: {
        first: "Shisui",
        last: "Uchiha",
    }
}

console.log(editObject(ob,"name.first","Itachi")); // output => { name: { first: 'Itachi', last: 'Uchiha' } }

Supports

For support or issues or queries contace me on my discord server, If you find any bug create a issue here.

Keywords