Socket
Socket
Sign inDemoInstall

foreach

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.3 to 2.0.4

3

index.js
var hasOwn = Object.prototype.hasOwnProperty;
var toString = Object.prototype.toString;
module.exports = function forEach (obj, fn, ctx) {
if (typeof fn !== 'function') {
if (toString.call(fn) !== '[object Function]') {
throw new TypeError('iterator must be a function');

@@ -7,0 +8,0 @@ }

{
"name": "foreach",
"description": "foreach component + npm package",
"version": "2.0.3",
"version": "2.0.4",
"author": "Manuel Stofer <manuel@takimata.ch>",
"contributors": [
{
"name": "Manuel Stofer"
},
{
"name": "Jordan Harband",
"url": "https://github.com/ljharb"
}
],
"license": "MIT",

@@ -40,3 +49,4 @@ "main": "index.js",

"ipad/6.0..latest",
"iphone/6.0..latest"
"iphone/6.0..latest",
"android-browser/4.2"
]

@@ -43,0 +53,0 @@ }

@@ -16,2 +16,6 @@ var test = require('tape');

t.doesNotThrow(function () { forEach(arr, function () {}); }, 'function is a function');
t.doesNotThrow(function () { forEach(arr, setTimeout); }, 'setTimeout is a function');
if (typeof window !== 'undefined') {
t.doesNotThrow(function () { forEach(arr, window.alert); }, 'alert is a function');
}
t.end();

@@ -37,2 +41,3 @@ });

});
st.end();
});

@@ -47,2 +52,3 @@

});
st.end();
});

@@ -55,2 +61,3 @@

});
st.end();
});

@@ -105,2 +112,3 @@

});
st.end();
});

@@ -115,2 +123,3 @@

});
st.end();
});

@@ -123,2 +132,3 @@

});
st.end();
});

@@ -145,3 +155,3 @@

st.equal(counter, index, 'index ' + index + ' is passed as second argument');
st.equal(str[index], item);
st.equal(str.charAt(index), item);
counter += 1;

@@ -152,2 +162,3 @@ });

t.end();
});
});

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc