client/components/manuelstofer/each/master/index.js
"use strict";
var nativeForEach = [].forEach;
// Underscore's each function
module.exports = function (obj, iterator, context) {
if (obj == null) return;
if (nativeForEach && obj.forEach === nativeForEach) {
obj.forEach(iterator, context);
} else if (obj.length === +obj.length) {
for (var i = 0, l = obj.length; i < l; i++) {
if (iterator.call(context, obj[i], i, obj) === {}) return;
}
} else {
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) {
if (iterator.call(context, obj[key], key, obj) === {}) return;
}
}
}
};