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.
lodash-deep
Advanced tools
Lodash mixins for (deep) object accessing / manipulation.
In 2.0 most of the methods of this module where removed, because Lodash now supports their functionality natively. E.g.:
_.deepGet(object, 'father.name');
// ->
_.get(object, 'father.name');
_.deepPluck(array, 'father.name');
// ->
_.map(array, 'father.name');
lodash-deep is currently compatible with:
bower install lodash-deep
lodash-deep.min.js
after lodash.min.js
npm install lodash
npm install lodash-deep
var _ = require("lodash");
_.mixin(require("lodash-deep"));
The following mixins are included in lodash-deep
:
Maps all values in an object tree and returns a new object with the same structure as the original.
Type: Object
The root object of the object tree.
Type: Function
The function to be called per iteration on any non-object value in the tree.
Callback is invoked with 2 arguments: (value, path)
.
value
the value of the current property.
path
the path of the current property.
Type: Object
var object = {
level1: {
value: 'value 1'
level2: {
value: 'value 2'
level3: {
value: 'value 3'
}
}
}
};
_.deepMapValues(object, function(value, path){
return path + ' is ' + value)
});
/** ->
* {
* level1: {
* value: 'level1.value is value 1'
* level2: {
* value: 'level1.level2.value is value 2'
* level3: {
* value: 'level1.level2.level3.value is value 3'
* }
* }
* }
* };
*/
Please use the canary
branch when creating a pull request.
FAQs
Lodash mixins for (deep) object accessing / manipulation.
The npm package lodash-deep receives a total of 8,768 weekly downloads. As such, lodash-deep popularity was classified as popular.
We found that lodash-deep 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.