# All files / src/utils index-of.js

50% Statements 4/8
25% Branches 1/4
100% Functions 1/1
50% Lines 3/6

    1
    2
    3
    4
    5
    6
    7
    8
    9
    1018x

    18x
    3x

     var indexOf = [].indexOf;

    module.exports = function(arr, obj){
      Eif (indexOf) return arr.indexOf(obj);
      for (var i = 0; i < arr.length; ++i) {
        if (arr[i] === obj) return i;
      }
      return -1;
    };