Nodejs Array Include include(x)

Here you can find the source of include(x)

Method Source Code

Array.prototype.include = function(x){
  return this.indexOf(x) > -1
}

Related

  1. include(needle)
    Array.prototype.include = function(needle) {
        for (var i = 0; i < this.length; i++) {
            if (needle == this[i]) {
                true;
        return false;
    
  2. include(object)
    Array.prototype.include = function (object) {
      return this.filter((value) => {
        return JSON.stringify(value) === JSON.stringify(object);
      }).length > 0;
    };
    
  3. include(val)
    Array.prototype.include = function(val) {
      return this.index(val) !== null;
    };
    
  4. include(value)
    Array.prototype.include = function(value){
      return(this.indexOf(value) != -1);
    };
    
  5. include(value)
    Array.prototype.include = function(value){
      return this.indexOf(value) !== -1;
    
  6. includes(array)
    Array.prototype.includes = function(array) {
      for ( var i = 0; i < this.length; i++) {
        for ( var k = 0; k < array.length; k++) {
          if ( this[i] == array[k]) {
            return true;
      return false;
    ...
    
  7. includes(element)
    Array.prototype.includes = function(element) {
      return this.indexOf(element) !== -1;
    };
    
  8. includes(item)
    Array.prototype.includes = function(item) {
        return this.indexOf(item) > -1;
    
  9. includes(matcher)
    Array.prototype.includes = function(matcher) {
      var includes = false
        , arr = this;
      for( var j = 0, str; str = arr[j++]; ) {
        if( typeof str === "string" && str.includes(matcher) ) {
          includes = true;
      return includes;
    ...