mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-11-14 15:16:18 +00:00
10 lines
199 B
JavaScript
10 lines
199 B
JavaScript
|
|
||
|
var indexOf = [].indexOf;
|
||
|
|
||
|
module.exports = function(arr, obj){
|
||
|
if (indexOf) return arr.indexOf(obj);
|
||
|
for (var i = 0; i < arr.length; ++i) {
|
||
|
if (arr[i] === obj) return i;
|
||
|
}
|
||
|
return -1;
|
||
|
};
|