NuclearDispersionSystem/ant-design-vue-jeecg/node_modules/xe-utils/methods/array/arrayEach.js
2023-09-14 14:47:11 +08:00

14 lines
300 B
Java

function arrayEach (obj, iterate, context) {
if (obj) {
if (obj.forEach) {
obj.forEach(iterate, context)
} else {
for (var index = 0, len = obj.length; index < len; index++) {
iterate.call(context, obj[index], index, obj)
}
}
}
}
module.exports = arrayEach