vue-app-sdk
Version:
22 lines (21 loc) • 688 B
JavaScript
;
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const isArrayLike = require("./isArrayLike.cjs");
function createBaseEach(eachFunc, fromRight) {
return function(collection, iteratee) {
if (collection == null) {
return collection;
}
if (!isArrayLike.default(collection)) {
return eachFunc(collection, iteratee);
}
var length = collection.length, index = -1, iterable = Object(collection);
while (++index < length) {
if (iteratee(iterable[index], index, iterable) === false) {
break;
}
}
return collection;
};
}
exports.default = createBaseEach;