filter-array-of-objects
Advanced tools
Comparing version 1.0.3 to 1.0.4
12
index.js
const _ = require("lodash"); | ||
module.exports = function (arrObj, propertiesToDelete) { | ||
function User(properties, obj){ | ||
_.forEach(properties, function (property, j) { | ||
this[property] = obj[property]; | ||
}); | ||
} | ||
module.exports = function (arrObj, properties) { | ||
_.forEach(arrObj, function (obj, i) { | ||
if (obj != null || obj != undefined) { | ||
_.forEach(propertiesToDelete, function (property, j) { | ||
delete obj[property]; | ||
}); | ||
obj = new User(properties, obj); | ||
} | ||
}); | ||
} |
{ | ||
"name": "filter-array-of-objects", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Filter propertie of array of objects", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
664
12
0