1
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
function arrayIndexOf (list, val) {
|
||||
if (list.indexOf) {
|
||||
return list.indexOf(val)
|
||||
}
|
||||
for (var index = 0, len = list.length; index < len; index++) {
|
||||
if (val === list[index]) {
|
||||
return index
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = arrayIndexOf
|
||||
Reference in New Issue
Block a user