North Pittsburgh Meatpackers
    Wondering what’s next for npm?Check out our public roadmap! »

    @amphibian/extend

    1.1.16 • Public • Published

    extend

    build status

    extends a parent object while letting keys from child overwrite it

    npm install @amphibian/extend
    
    var extend = require('@amphibian/extend');
     
    var parent = {
        obj: {
            foo: 'bar',
            bar: 'foo'
        },
        obj2: {
            foo: 'bar',
            bar: 'foo'
        },
        arr: [0, 1, 2, 3]
    };
     
    var child = {
        obj: {
            foo: 'overwrite'
        },
        obj2: false,
        arr: ['hello']
    };
     
    // Extend parent object
    extend(parent, child); // > {obj: {foo: 'overwrite', bar: 'foo'}, obj2: false, arr: ['hello']}

    Keywords

    none

    Install

    npm i @amphibian/extend

    DownloadsWeekly Downloads

    28

    Version

    1.1.16

    License

    ISC

    Last publish

    Collaborators

    • avatar