Asjidkalam / deeply-object-assign

A function which acts like Object.assign method but recursively

Home Page:https://www.npmjs.com/package/deeply-object-assign

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deeply Object Assign

A function which acts like Object.assign method but recursively (with N levels of depth).

Installation

$ npm install deeply-object-assign

Usage

const deeplyObjectAssign = require('deeply-object-assign');

// Assing N objects deeply
const result = deeplyObjectAssign(
  {a: { x: 3, y: { m: 4} } },
  {a: { x: 4, y: { m: 5, n: 6 } } },
  {a: { z: 7 }},
  {a: { x: 6, y: { n: 8 } },
);
// result: {a: { x: 6, y: { m: 5, n: 8 }, z: 7 }

About

A function which acts like Object.assign method but recursively

https://www.npmjs.com/package/deeply-object-assign

License:MIT License


Languages

Language:JavaScript 100.0%