Nodejs Array Contain contains(oneItem)

Here you can find the source of contains(oneItem)

Method Source Code

Array.prototype.contains = function(oneItem)
{
   var index = dojo.indexOf(this, oneItem);
   return index != -1;
}

Related

  1. contains(obj)
    Array.prototype.contains = function(obj)
        return (this.indexOf(obj) > -1);
    
  2. contains(obj)
    Array.prototype.contains = function(obj) {
      for (var i = 0; i < this.length; i++) {
        if (obj == this[i])
          return true;
    };
    
  3. contains(obj, firm)
    Array.prototype.contains = function(obj, firm) {
      firm = firm === true ? true : false;
      var i = this.length;
      while (i--) {
        if ((!firm && this[i] == obj) || this[i] === obj) {
          return true;
      return false;
    ...
    
  4. contains(object)
    Array.prototype.contains = function(object) {
      return (this.indexOf(object) != -1);
    
  5. contains(object)
    Array.prototype.contains = function(object) {
      if (this.indexOf(object) !== -1) {
        return true;
      return false;
    };
    
  6. contains(query)
    Array.prototype.contains = function (query)
      function compare(element) 
        return element === query;
      return this.some(compare);
    };
    
  7. contains(search)
    Array.prototype.contains = function(search) {
      return this.indexOf(search) !== -1;
    };
    
  8. contains(str)
    Array.prototype.contains = function(str)
      return this.indexOf(str) != -1;
    };
    
  9. contains(str)
    Array.prototype.contains = function(str) {
      var i = this.length;
      while (i--) {
        if (this[i] === str) {return true; }
      return false;
    };