Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

nested-object-assign

Geta316.8kMIT1.0.4

Package to support nested merging of objects & properties, using Object.Assign

es6, npm, nested, object, assign

readme

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