commit
26da9f0b2e
1 changed files with 4 additions and 0 deletions
|
@ -70,6 +70,10 @@
|
|||
function indexOf(value, array) {
|
||||
var i = 0, l = array.length, v;
|
||||
|
||||
if (typeof value == 'undefined') {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (value.constructor === String) {
|
||||
for (; i < l; i = i + 1) if (value.localeCompare(array[i]) === 0) return i;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue