public/javascript/libs/wysihtml5-0.3.0.js
function(needle) {
      if (arr.indexOf) {
        return arr.indexOf(needle) !== -1;
      } else {
        for (var i=0, length=arr.length; i<length; i++) {
          if (arr[i] === needle) { return true; }
        }
        return false;
      }
    }
function(needle) {
      if (arr.indexOf) {
        return arr.indexOf(needle) !== -1;
      } else {
        for (var i=0, length=arr.length; i<length; i++) {
          if (arr[i] === needle) { return true; }
        }
        return false;
      }
    }
function ( needle ) { if ( arr . indexOf ) { return arr . indexOf ( needle ) !== - 1 ; } else { for ( var i = 0 , length = arr . length ; i < length ; i ++ ) { if ( arr [ i ] === needle ) { return true ; } } return false ; } }
Check whether a given object exists in an array

@example
wysihtml5.lang.array([1, 2]).contains(1);
// => true
Check whether a given object exists in an array