Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
object-merge
Advanced tools
Merges JavaScript objects recursively without altering the objects merged.
Merges JavaScript objects recursively without altering the objects merged.
npm install object-merge
https://npmjs.org/package/object-merge Source code available at: https://github.com/matthewkastor/object-merge/
In node:
var objectMerge = require('object-merge');
var x = {
a : 'a',
b : 'b',
c : {
d : 'd',
e : 'e',
f : {
g : 'g'
}
}
};
var y = {
a : '`a',
b : '`b',
c : {
d : '`d'
}
};
var z = {
a : {
b : '``b'
},
fun : function foo () {
return 'foo';
},
aps : Array.prototype.slice
};
var out = objectMerge(x, y, z);
// out.a will be {
// b : '``b'
// }
// out.b will be '`b'
// out.c will be {
// d : '`d',
// e : 'e',
// f : {
// g : 'g'
// }
// }
// out.fun will be a clone of z.fun
// out.aps will be equal to z.aps
In the browser, include ./browser/object-merge_web.js
in your page.
objectMerge
will be available in your page.
For full documentation see the docs folder. For examples see the example folder.
Tests can be run from the root of this package with
npm test
There are several other scripts listed in package.json for development and
hacking on this module. They can be run with npm run-script
followed by the
scripts property corresponding to the script you want to run. For example,
given a script called buildDocs
, it could be run from the package root by:
npm run-script buildDocs
Matthew Kastor atropa
matthewkastor@gmail.com https://plus.google.com/100898583798552211130
FAQs
Merges JavaScript objects recursively without altering the objects merged.
The npm package object-merge receives a total of 4,861 weekly downloads. As such, object-merge popularity was classified as popular.
We found that object-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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.