
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
Merge two JavaScript objects deeply (recursively) using sensible rules.
fullMerge(target: any, source:any): any
var fullMerge = require('full-merge')
var src = {
foo: null,
bar: {
b: 1,
a: true,
r: new Date()
},
arr: [],
extra: 0 // new property not declared in target; will be included in result
};
var tgt = {
foo: 'foo', // value will be preserved since src.foo is null
bar: 3, // value is overwritten by src.bar object
arr: [1, 2, 3], // will be overwritten by src.arr empty array
rgx: /.*/g // will be preserved since src.rgx is not declared
};
RegExp.prototype.toJSON = RegExp.prototype.toString;
console.log(JSON.stringify(fullMerge(tgt, src)));
Output:
{
"foo": "foo",
"bar": {
"b": 1,
"a": true,
"r": "2016-07-19T20:22:51.264Z"
},
"arr": [],
"rgx": "/.*/g",
"extra": 0
}
npm install full-merge --save
FAQs
Merge two JavaScript objects deeply (recursively) using sensible rules
We found that full-merge 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
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.