Comparing version
@@ -0,1 +1,3 @@ | ||
var isFunction = require('is-function') | ||
module.exports = forEach | ||
@@ -7,3 +9,3 @@ | ||
function forEach(list, iterator, context) { | ||
if (toString.call(iterator) !== '[object Function]') { | ||
if (!isFunction(iterator)) { | ||
throw new TypeError('iterator must be a function') | ||
@@ -10,0 +12,0 @@ } |
{ | ||
"name": "for-each", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "A better forEach", | ||
@@ -23,3 +23,5 @@ "keywords": [], | ||
}, | ||
"dependencies": {}, | ||
"dependencies": { | ||
"is-function": "~1.0.0" | ||
}, | ||
"devDependencies": { | ||
@@ -26,0 +28,0 @@ "tape": "~1.1.0" |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
9719
0.48%194
0.52%0
-100%1
Infinity%+ Added
+ Added