
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
merge-objects-values
Advanced tools
yarn add merge-objects-values
OR npm i --save merge-objects-values
const merge = require("merge-objects-values");
// Simple merge
const object1 = { foo: 2 };
const object2 = { foo: 4 };
merge(null, object1, object2); // { foo: 6 }
// It merge recursively, so you can make the sum of sub-objects
const object3 = { foo: { bar: 2 } };
const object4 = { foo: { bar: 4 } };
const object5 = { foo: { bar: 6 } };
merge(null, object3, object4, object5); // { foo: { bar: 12 } }
// You can disable deep merge
const object6 = { foo: { bar: 2 } };
const object7 = { foo: { bar: 4 } };
merge({ deep: false }, object6, object7); // { foo: { bar: 4 } }
// You can apply transformer on number
const object8 = { foo: 10, bar: 3 };
const object9 = { foo: 2, bar: 9 };
merge({ number: (a, b) => a * b }, object8, object9); // { foo: 20, bar: 27 }
// You can apply transformer on string
const object10 = { bar: "oui" };
const object11 = { bar: "non" };
merge({ string: (a, b) => `${a} - ${b}` }, object10, object11); // { bar: "oui - non" }
The first param is the config, and all the next params are objects you want to merge.
config
:
deep
Boolean, default truestring
Functionnumber
FunctionFAQs
## Installation
The npm package merge-objects-values receives a total of 9 weekly downloads. As such, merge-objects-values popularity was classified as not popular.
We found that merge-objects-values 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.