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.
14 lines
291 B
14 lines
291 B
4 years ago
|
import looseEqual from './loose-equal';
|
||
|
|
||
|
var looseIndexOf = function looseIndexOf(arr, val) {
|
||
|
// Assumes that the first argument is an array
|
||
|
for (var i = 0; i < arr.length; i++) {
|
||
|
if (looseEqual(arr[i], val)) {
|
||
|
return i;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return -1;
|
||
|
};
|
||
|
|
||
|
export default looseIndexOf;
|