Research
Security News
Malicious PyPI Package ‘pycord-self’ Targets Discord Developers with Token Theft and Backdoor Exploit
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
@jalik/deep-extend
Advanced tools
A utility to merge deep objects.
Use it when you need to merge nested objects.
This library has been unit tested.
The following code shows how to merge objects without losing values that are not defined in objects to merge.
import deepExtend from "@jalik/deep-extend";
const defaultColors = {
cold: {
blue: "#0000FF",
green: "#00FF00"
},
hot: {
red: "#FF0000",
yellow: "#FFFF00"
}
};
const customColors = {
cold: {
blue: "#48C2ED"
},
hot: {
yellow: "#E6CB5F"
}
};
// Merge all colors into a new object.
// The final colors will have custom blue and yellow colors,
// but the other colors will be the default ones.
const finalColors = deepExtend({}, defaultColors, customColors);
See below how it is easy to merge arrays recursively.
import deepExtend from "@jalik/deep-extend";
const a = [1, [2, [3]]];
const b = [undefined, [4, [undefined, 5], 6], 7];
const c = deepExtend([], a, b);
// c would result to [1, [4, [3, 5], 6], 7]
History of releases is in the changelog.
The code is released under the MIT License.
v1.0.2
FAQs
Deep merge any objects
The npm package @jalik/deep-extend receives a total of 222 weekly downloads. As such, @jalik/deep-extend popularity was classified as not popular.
We found that @jalik/deep-extend demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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 researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.