Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
dotpath-resolve
Advanced tools
Dot-path based object property selector.
All possible use cases are described in test code.
var resolve = require('dotpath-resolve');
// object to be searched
var obj = {
k1: {
k11: 'k11',
k2: 'k1.k2',
k3: [1, 2, 3]
},
k2: 'k2'
};
resolve(obj, 'k2'); // k2
resolve(obj, 'k1.k11'); // k11
resolve(obj, 'k2', 'k1'); // k1.k2
resolve(obj, 'k1.k3.1'); // 2
resolve(obj, 'missing'); // undefined
resolve(obj, 'k2', 'k1.k3.0.missing'); // k1.k2
Search given object using dotpath selector and optionally start selector.
Parameters:
Return Values:
Returns a value of obj
key specified by given selector
or undefined
if a key was not found.
Complete API Documentation including private and public methods is generated from source code by JSDoc tool and is available here.
Code coverage report for all files is available here.
npm test
- run testsnpm run jsdoc
- build jsdocnpm run dev
- run tests continuouslyThe MIT License (MIT)
FAQs
Dot-path based object property selector
The npm package dotpath-resolve receives a total of 3 weekly downloads. As such, dotpath-resolve popularity was classified as not popular.
We found that dotpath-resolve 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
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.