Nodejs Utililty Methods Array In

List of utility methods to do Array In

Description

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

Method

in_array(value, caseSensitive)
Array.prototype.in_array = function(value, caseSensitive)
  for(var i=0; i < this.length; i++)
    if(caseSensitive)
      if(this[i].toLowerCase() == value.toLowerCase())
        return true;
...
isIn(key, value)
Array.prototype.isIn = function(key, value) {
    for(var i =0; i<this.length; i++) {
        if(this[i][key] == value) {
            return true;
    return false;
};
isInArray(elem)
Array.prototype.isInArray = function (elem) {
    for (i = 0, len = this.length; i < len; i++) {
        if (this[i] == elem) {
            return true;
    return false;