code: function(needle) {
          if (arr.indexOf) {
            return arr.indexOf(needle);
          } else {
            for (var i=0, length=arr.length; i<length; i++) {
              if (arr[i] === needle) { return i; }
            }
            return -1;
          }
      }
docs: Check whether a given object exists in an array and return index
  If no elelemt found returns -1
  
  @example
  wysihtml5.lang.array([1, 2]).indexOf(2);
  // => 1