Detects if input is "like" an array.

@private
@param {Mixed} a
@return {Boolean}
962281
function isArrayLike (a) {
  if ('object' != typeof a)
    return false
  else if (null == a)
    return false
  else
    return Boolean( Array.isArray(a)
                    || null != a.length
                    || a[0] )
}
327407
function(a){
            if(!a || !this.isArray(a)) return; 

            var i = 0,start = 0,len = a.length;

            for(;i < len; i++){
             if(!this.isUndefined(a[i]) && !this.isNull(a[i]) && !(this.isEmpty(a[i]))){
              a[start]=a[i];
              start += 1;
            }
          }

          a.length = start;
          return a;
    }
187421
function solcOutputLike(obj) {
  let isSolcLike = false;

  Object.keys(obj).forEach((key) => {
    if (!isSolcLike && typeof obj[key] === 'object') {
      isSolcLike = (typeof obj[key].bytecode === 'string'
                 && typeof obj[key].interface === 'string');
    }
  });

  return isSolcLike;
}
576716
function inArray(val, array, topData) {
  for (var i in array) {
    var v = array[i];
    v = getRef(v, topData);
    v = checkRegExp(v);
    if (typeof val === 'string' && v && v instanceof RegExp) {
      if (v.test(val)) return true;
    } else {
      if (val === v) return true;
    }
  }
  return false;
}
632617
function(value) {
		if (Array.isArray && Array.isArray(value)) {
			return true;
		}
		var type = Object.prototype.toString.call(value);
		if (type.substr(0, 7) === '[object' && type.substr(-6) === 'Array]') {
			return true;
		}
		return false;
	}
236398
function (arr) {
        var result = true;
        arr.forEach(function (elem) {
            if (!(typeof elem === 'string' || typeof elem === 'number')) {
                result = false;
            }
        });

        return result;
    }
1027741
function toArray(arrayLike) {
        if (arrayLike === undefined || arrayLike === null) {
            return [];
        }
        if (Array.isArray(arrayLike)) {
            return arrayLike;
        }
        return [arrayLike];
    }
863207
function find(array, fn) {
    if (!(0, _is.isArray)(array)) {
        throw new Error('array should be Array type but got ' + (0, _is.whatIs)(array));
    }
    if ((0, _changlinWarning.warning)(!(0, _is.isFunction)(fn), 'fn is not function ,\'find\' will return undefined')) {
        return undefined;
    }

    if (array.find) {
        return array.find(fn);
    }

    var result = void 0;

    try {
        for (var i = 0; i < array.length; i++) {
            if (fn(array[i])) {
                result = array[i];
                break;
            }
        }
    } catch (e) {
        (0, _changlinWarning.warning)(true, e);
    }

    return result;
}
648496
function is(obj, type) {
      if (!type) {
        return obj !== undefined;
      }

      if (type == 'array' && Arr.isArray(obj)) {
        return true;
      }

      return typeof obj == type;
    }
52005
function includes(array, element) {
  if (!array) {
    return false;
  }

  const length = array.length;

  for (let i = 0; i < length; i++) {
    if (array[i] === element) {
      return true;
    }
  }

  return false;
}
876338
function similar(a,b) {
    if(a instanceof Array) {
        if(!(b instanceof Array))
            return false

        var tenPercent = a.length/10
        var notEqual = Math.abs(a.length-b.length) // initialize with the length difference
        for(var n=0; n<a.length; n++) {
            if(equal(a[n],b[n])) {
                if(notEqual >= 2 && notEqual > tenPercent || notEqual === a.length) {
                    return false
                }

                notEqual++
            }
        }
        // else
        return true

    } else if(a instanceof Object) {
        if(!(b instanceof Object))
            return false

        var keyMap = merge(arrayToMap(Object.keys(a)), arrayToMap(Object.keys(b)))
        var keyLength = Object.keys(keyMap).length
        var tenPercent = keyLength / 10
        var notEqual = 0
        for(var key in keyMap) {
            var aVal = a[key]
            var bVal = b[key]

            if(!equal(aVal,bVal)) {
                if(notEqual >= 2 && notEqual > tenPercent || notEqual+1 === keyLength) {
                    return false
                }

                notEqual++
            }
        }
        // else
        return true

    } else {
        return a===b || Number.isNaN(a) && Number.isNaN(b)
    }
}
843140
function matches(patterns) {
  if (!Array.isArray(patterns)) {
    if (typeof patterns === 'string') {
      return patterns.indexOf('!') === 0 ? [] : glob.sync(patterns);
    } else {
      return [];
    }
  }
  let result = [];
  patterns.forEach((pattern) => {
    const exclusion = pattern.indexOf('!') === 0;
    if (exclusion) {
      pattern = pattern.slice(1);
    }
    const arr = glob.sync(pattern);
    if (exclusion) {
      result = difference(result, arr);
    } else {
      result = union(result, arr);
    }
  });
  return result;
}
1038337
function isPrimitiveArray( value ) {
	var len;
	if ( !isArray( value ) ) {
		return false;
	}
	len = value.length;
	if ( !len ) {
		return false;
	}
	for ( var i = 0; i < len; i++ ) {
		if ( !isPrimitive( value[i] ) ) {
			return false;
		}
	}
	return true;
}
217635
function isArrayOfArray(o) {
    if(isArray(o)) {
      if(o.length > 0) {
        if(isArray(o[0])) {
          return true;
        }
      }
    }
    return false;
  }
1258072
function matches(str, match) {
    if (Array.isArray(match)) {
        var l = match.length;
        for( var s=0; s < l; s++) {
            if ( mm(str,match[s])) {
                return true;
            }
        }
        return false;
    }
    return match.test(str);
}
253058
function containsSingleMatch(str, arr) {
  var filtered = arr.filter(function(e) { return e.indexOf(str) === 0 })
  return filtered.length === 1
}
752683
function arrayContains(array, subject) {
		// See if an array contains a particular value
		for (var i in array) {
			if (array.hasOwnProperty(i) && array[i] === subject) {
				return true;
			}
		}
		return false;
	}