set value in nested object
npm install nessy[NPMIMGURL]: https://img.shields.io/npm/v/nessy.svg?style=flat
[BuildStatusURL]: https://github.com/coderaiser/nessy/actions?query=workflow%3A%22Node+CI%22 "Build Status"
[BuildStatusIMGURL]: https://github.com/coderaiser/nessy/workflows/Node%20CI/badge.svg
[NPMURL]: https://npmjs.org/package/nessy "npm"
[CoverageURL]: https://coveralls.io/github/coderaiser/nessy?branch=master
[CoverageIMGURL]: https://coveralls.io/repos/coderaiser/nessy/badge.svg?branch=master&service=github
Set value in nested object.
npm i nessy --save
``js
import {nessy} form 'nessy';
nessy('hello.world', 'why not?', '.', {
hello: {
world: 'could be used in browser as well',
},
});
// returns
({
hello: {
world: 'why not?',
},
});
nessy('helloworld', 'why not?', '', {
hello: {
world: 'can be used any divider',
},
});
// returns
({
hello: {
world: 'why not?',
},
});
// even arrays supported
nessy('hello.0', 'world', {});
// returns
({
hello: ['world'],
});
``
- jessy - get value by object property.
- all-object-keys - get all keys of object.
- finicky delete property of an object
MIT