JSPM

deeply-object-assign

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q34090F
  • License MIT

Acts like Object.assign method but recursively

Package Exports

  • deeply-object-assign

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (deeply-object-assign) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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 } }