1
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
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
|
||||
Reference in New Issue
Block a user