
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.
@pdz/objectpath
Advanced tools
A small set of universal functions for working with objects, using dot-separated path strings.
Use:
const pdzOP = require('@pdz/objectpath');
Get examples:
const test = { a: { b: { c: 123 }, d: { e: 456 } } }
pdzOP.get(test, 'a.b.c');
// 123
pdzOP.get(test, ['a.b.c', 'a.b', 'x.y.z']);
// { 'a.b.c': 123, 'a.b': { c: 123 }, 'x.y.z': undefined }
Set examples:
const test = { a: { b: { c: 123 }, d: { e: 456 } } }
pdzOP.set(test, 'a.b.c', 789);
// { a: { b: { c: 789 }, d: { e: 456 } } }
pdzOP.set(test, { 'a.b.c': 789, 'a.f': 987 });
// { a: { b: { c: 789 }, d: { e: 456 }, f: 987 } }
pdzOP.set(test, ['a.b.c', 'a.d.e', 'a.f'], { g: 1 });
// { a: { b: { c: { g: 1 } }, d: { e: { g: 1 } }, f: { g: 1 } } }
Assign examples:
const test = { a: { b: { c: 123 }, d: { e: 456 } } }
pdzOP.assign(test, 'a.b', { c2: 789 });
// { a: { b: { c: 123, c2: 789 }, d: { e: 456 } } }
pdzOP.assign(test, { 'a.b': { c2: 789 }, 'a.d': { e2: 987 } });
// { a: { b: { c: 123, c2: 789 }, d: { e: 456, e2: 987 } } }
pdzOP.assign(test, ['a.b', 'a.d'], { f: 654 });
// { a: { b: { c: 123, c2: 789, f: 654 }, d: { e: 456, e2: 987, f: 654 } } }
Delete examples:
const test = { a: { b: { c: 123 }, d: { e: 456 } } }
pdzOP.del(test, 'a.b.c');
// { a: { b: { }, d: { e: 456 } } }
pdzOP.del(test, ['a.b.c', 'a.d']);
// { a: { b: { } } }
FAQs
Simple object manipulation by path
The npm package @pdz/objectpath receives a total of 0 weekly downloads. As such, @pdz/objectpath popularity was classified as not popular.
We found that @pdz/objectpath 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.