
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
immutability-helper-x
Advanced tools
expand the immutability-helper, to support update by path string, like the get/set in lodash
The library extends the kolodny/immutability-helper to support update by path string, like the get/set in lodash.
npm install -S immutability-helper-x
import update, { updateChain } from 'immutability-helper-x';
const data = {
a: {
b: {
c: 1,
d: 2,
e: [3, 2, 1],
}
},
f: 4,
};
// 1. if you want to update the value of data.a.b, you can
update.$set(data, 'a.b', newValue);
// or
update.$set(data, ['a', 'b'], newValue);
// 2. other methods like push and apply in original update lib
update.$push(data, 'arr', ['car', 'bus']);
update.$apply(data, 'a.b', value => ++value);
// 3. extend method
// step 1
update.extend('$addtax', function(tax, original) {
return original + (tax * original);
});
// step 2
update.$addtax(data, 'price', 0.8);
// or
update(data, {
price: { $addtax: 0.8 },
});
// 4. update multiple values at the same time in a chain
const d = updateChain(data)
.$set('a.b.c', 444)
.$merge('a.b', {
d: 555,
})
.$push('a.e', [4])
.$unshift('a.e', [0])
.$splice('a.e', [[1, 0, 8]])
.$apply('a.b.d', val => val + 100)
.value();
FAQs
expand the immutability-helper, to support update by path string, like the get/set in lodash
The npm package immutability-helper-x receives a total of 26 weekly downloads. As such, immutability-helper-x popularity was classified as not popular.
We found that immutability-helper-x 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.