
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
Merge the enumerable attributes of two objects deeply.
Reason of creating this fork is inactivity of original deepmerge plugin. This version has several bug fixes.
var util = require('util');
var merge = require('deepmerge2');
var x = {
foo: { bar: 3 },
array: [ { does: 'work', too: [ 1, 2, 3 ] } ]
};
var y = {
quux: 5,
foo: { baz: 4 },
array: [ { does: 'work', too: [ 4, 5, 6 ] }, { really: 'yes' } ]
};
console.log(util.inspect(merge(x, y), false, null));
output:
{
quux: 5,
foo: { bar: 3, baz: 4 },
array: [ { does: 'work', too: [ 1, 2, 3, 4, 5, 6 ] }, { really: 'yes' } ]
}
var merge = require('deepmerge2');
Merge two objects x and y deeply, returning a new merged object with the
elements from both x and y.
If an element at the same key is present for both x and y, the value from
y will appear in the result.
The merge is immutable, so neither x nor y will be modified.
The merge will also merge arrays and array values.
With npm do:
npm install deepmerge2
With npm do:
npm test
FAQs
A library for deep (recursive) merging of Javascript objects
We found that deepmerge2 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.