npm.io
6.0.1 • Published 4 months ago

nessy

Licence
MIT
Version
6.0.1
Deps
0
Size
7 kB
Vulns
0
Weekly
0
Stars
2

Nessy NPM version Build Status Coverage Status

Set value in nested object.

Install

npm i nessy --save

Hot to use?

import {nessy} from 'nessy';

nessy('hello.world', 'why not?', '.', {
    hello: {
        world: 'could be used in browser as well',
    },
})(// returns
{
    hello: {
        world: 'why not?',
    },
});
nessy('hello*world', 'why not?', '*', {
    hello: {
        world: 'can be used any divider',
    },
});
({
    hello: {
        world: 'why not?',
    },
});
// even arrays supported
nessy('hello.0', 'world', {});
({
    hello: ['world'],
});

License

MIT

Keywords