django-vue3-admin-web/node_modules/xe-utils/arrayEach.js
2025-10-20 21:21:14 +08:00

14 lines
320 B
JavaScript

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