Nodejs Utililty Methods Array Remove Object

List of utility methods to do Array Remove Object

Description

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

Method

removeObject(object)
Array.prototype.removeObject = function(object)
  for (var i = 0; i < this.length; ++i)
    if (this[i] === object)
      this.remove(i);
      break;
removeObjectAtIndex(index)
Array.prototype.removeObjectAtIndex = function (index){
  var array = this.splice(index);
  array.shift();
  return this.concat(array);
removeByKey(i)
Array.prototype.removeByKey = function(i){
    if (isNaN(i) || i > this.length)
        return false;
    this.splice(i,1);