Nodejs Utililty Methods Array Contain Key

List of utility methods to do Array Contain Key

Description

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

Method

containsKey(aName)
Array.prototype.containsKey = function(aName) {
    var i = this.length - 1;
    while(i >= 0) {
        if(this[i].getKey() === aName)
            return true;
        i--;
    return false;
};
...
containsKey(key)
Array.prototype.containsKey = function(key) {
  return typeof this[key] !== 'undefined';