Nodejs Utililty Methods Array Has Object

List of utility methods to do Array Has Object

Description

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

Method

hasObject(
Array.prototype.hasObject = (
  !Array.indexOf ? function (o)
    var l = this.length + 1;
    while (l -= 1)
        if (this[l - 1] === o)
            return true;
...
hasObject(o)
Array.prototype.hasObject = function (o)
    var l = this.length + 1;
    while (l -= 1)
        if (this[l - 1].name === o.name)
            return true;
    return false;
hasObject(o)
Array.prototype.hasObject = (!Array.indexOf ? function (o) {
  var l = this.length + 1;
  while (l--) {
    if (this[l - 1] === o) {
      return true;
  return false;
} : function (o) {
...
hasObjectExists(item)
Array.prototype.hasObjectExists = function(item) {
    for (i = 0; i < this.length; i++) {
        if(this[i].id == item.id){
            return true;
    return false;
};