alromh87 / nessy

set value in nested object

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nessy License NPM version Dependency Status 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?'
        }
    }
}

Related

License

MIT

About

set value in nested object

License:MIT License


Languages

Language:JavaScript 100.0%