nested-object-assign

1.0.4 • Public • Published

NestedObjectAssign

Build Status dependencies Status

This package extends the functionality given by Object.assign() to also include the values of nested objects.

Installation

npm install --save nested-object-assign

Usage

Works just like Object.Assign, add an empty object first (the object you want the other objects merged into), then as many objects as you wish afterwards, comma separated.

import nestedObjectAssign from 'nested-object-assign';
const defaults = {}

function test() {
    let data = nestedObjectAssign({}, defaults, object1, object2, object3);
}

Tests

Tests were done for these node.js versions:

  • 8
  • 7
  • 6

Dependencies (0)

    Dev Dependencies (24)

    Package Sidebar

    Install

    npm i nested-object-assign

    Weekly Downloads

    112,189

    Version

    1.0.4

    License

    MIT

    Unpacked Size

    7.67 kB

    Total Files

    6

    Last publish

    Collaborators

    • geta_digital
    • valdisiljuconoks
    • eirhor