Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 8, 2024 via pnpm

deep-extend 0.6.0

Recursive object extending
Package summary
Share
0
issues
1
license
1
MIT
Package created
29 Mar 2012
Version published
22 May 2018
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
deep-extend@0.6.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of deep-extend 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does deep-extend do?

Deep-extend is a handy JavaScript package which enables recursive extending of objects. This npm package allows for the seamless merging of the properties from one JavaScript object to another "deep" object, even if these are nested objects. It's particularly useful in situations where you need to overwrite some values of the first object with values from the second object while keeping intact non-overlapping keys.

How do you use deep-extend?

Deep-extend package is simple to use. All you need to do is to install the package using $ npm install deep-extend, and then require the package in your application with var deepExtend = require('deep-extend'). After this, you can pass two or more objects to the deepExtend function for merging.

Here is a usage example:

var deepExtend = require('deep-extend');
var obj1 = {
  a: 1,
  b: 2,
  d: {
    a: 1,
    b: [],
    c: { test1: 123, test2: 321 }
  },
  f: 5,
  g: 123,
  i: 321,
  j: [1, 2]
};

var obj2 = {
  b: 3,
  c: 5,
  d: {
    b: { first: 'one', second: 'two' },
    c: { test2: 222 }
  },
  e: { one: 1, two: 2 },
  f: [],
  g: (void 0),
  h: /abc/g,
  i: null,
  j: [3, 4]
};

deepExtend(obj1, obj2);

console.log(obj1);

After execution, the properties from obj2 have been merged into obj1, updating or extending the initial values.

Where are the deep-extend docs?

The primary source of documentation for deep-extend package is available in the README of the GitHub repository at git://github.com/unclechu/node-deep-extend.git. This readme document provides a comprehensive guide on how to install, use and run unit tests on deep-extend. If you encounter any issues while using this npm package, you're encouraged to report them in the 'Issues' section of this github repository.