nessy

5.3.0 • Public • Published

Nessy NPM version Build Status Coverage Status

Set value in nested object.

Install

npm i nessy --save

Hot to use?

const nessy = require('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',
    },
});

// returns
({
    hello: {
        world: 'why not?',
    },
});

// even arrays supported
nessy('hello.0', 'world', {});
// returns
({
    hello: ['world'],
});

Related

License

MIT

Package Sidebar

Install

npm i nessy

Weekly Downloads

7,986

Version

5.3.0

License

MIT

Unpacked Size

7.01 kB

Total Files

5

Last publish

Collaborators

  • coderaiser