This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A simple forEach() implementation for Arrays, Objects and NodeLists | |
* @private | |
* @param {Array|Object|NodeList} collection Collection of items to iterate | |
* @param {Function} callback Callback function for each iteration | |
* @param {Array|Object|NodeList} scope Object/NodeList/Array that forEach is iterating over (aka `this`) | |
*/ | |
var forEach = function (collection, callback, scope) { | |
if (Object.prototype.toString.call(collection) === '[object Object]') { | |
for (var prop in collection) { |