Nodejs Utililty Methods Array Contain

List of utility methods to do Array Contain

Description

The list of methods to do Array Contain are organized into topic(s).

Method

contain(arg)
Array.prototype.contain = function(arg){
  var i=0;
  var arrSize = this.length;
  for(i=0;i<arrSize;i++){
    if(this[i] == arg){
      return true;
  return false;
...
contain(obj)
Array.prototype.contain = function(obj){
  for(var i=0;i<this.length;i++){
    if(this[i]==obj){
      return true;
  return false;
};
contains( func)
Array.prototype.contains = function( func) {
  if( $.isFunction(func) ) {
    for( var i=0; i<this.length; i++ ) {
      var item = this[i];
      if( func(item) == true ) {
        return true;
    return false;
...
contains( needle )
Array.prototype.contains = function ( needle ) {
    for (i in this) {
        if (this[i] == needle) return true;
    return false;
contains( needle )
Array.prototype.contains = function ( needle ) {
   for (i in this) {
       if (this[i] == needle) return true;
   return false;
contains( needle )
Array.prototype.contains = function ( needle ) {
   for (i in this) {
       if (this[i] === needle) return true;
   return false;
contains( v )
Array.prototype.contains = function( v ) {
  for ( var i = 0, l = this.length; i < l; i++ ) { 
    if ( this[ i ] === v ) return true; 
  return false;
contains()
Array.prototype.contains = function() {
  var args = arguments;
  if (args.length < 1) {
    return false;
  for (var i = 0; i < args.length; i++) {
    var found = false;
    for (var aIndex = 0; aIndex < this.length; aIndex++) {
      if (this[aIndex] === args[i]) {
...
contains(arg)
Array.prototype.contains = function(arg){
    for(var i = 0; i < this.length; i++)
        if(this[i] === arg)
            return true;
    return false;
};
contains(array)
Array.prototype.contains = function(array) {
  var arr1 = this.sort();
  var arr2 = array.sort();
  var i = arr1.length;
  if ( i < arr2.length ) {
    return false;
  while (i--) {
    if (arr1[i] === arr2[i]) {
...