You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
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
|
|
|