Comparing version 0.0.3 to 0.0.4
@@ -132,5 +132,21 @@ /* | ||
// | ||
// ### function filter (object, test) | ||
// #### @obj {Object} Object to iterate over | ||
// #### @test {function} test applied to each property. `function (value, key, object)` | ||
// filters the properties that `test` returns true on. | ||
// | ||
exports.filter = function (obj, test) { | ||
var n = Array.isArray(obj) ? [] : {} | ||
exports.each(obj, function (v, k) { | ||
if(test(v, k, obj)) | ||
n[k] = v | ||
}) | ||
return n | ||
} | ||
// | ||
// Extend the `utile` object with all methods from the | ||
// core node `util` methods | ||
// | ||
utile.mixin(utile, require('util')); | ||
utile.mixin(utile, require('util')); |
{ | ||
"name": "utile", | ||
"description": "A drop-in replacement for `util` with some additional advantageous functions", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"author": "Nodejitsu Inc <info@nodejitsu.com>", | ||
"contributors": [ | ||
{ "name": "Charlie Robbins", "email": "charlie@nodejitsu.com" } | ||
{ "name": "Charlie Robbins", "email": "charlie@nodejitsu.com" }, | ||
{ "name": "Dominic Tarr", "email": "dominic@nodejitsu.com" } | ||
], | ||
@@ -9,0 +10,0 @@ "repository": { |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
11692
8
0
244
79
1