Nodejs Array Without without(key, value)

Here you can find the source of without(key, value)

Method Source Code

Array.prototype.without = function (key, value) {
    return this.filter(function (e) {
        return e[key] != value;
    });//from  ww w  . jav  a2s.  co  m
}

Related

  1. without()
    Array.prototype.without = function() {
      var args = $A(arguments);
      return this.select(function(value) {
        return !args.include(value);
      });
    };
    
  2. without(ar)
    Array.prototype.without = function(ar) {
      var results = [];
      for (var i = 0, len = this.length; i < len; i++) {
        var found = false;
        for (var j = 0, len2 = ar.length; j < len2; j++) {
          if (this[i] === ar[j]) {
            found = true;
            break;
        if (!found) {
          results.push(this[i]);
      return results;
    };
    
  3. without(ar)
    Array.prototype.without = function(ar) {
      var results = [];
      for (var i = 0, len = this.length; i < len; i++) {
        if (ar.indexOf(this[i]) < 0) {
          results.push(this[i]);
      return results;
    };
    ...
    
  4. without(index)
    Array.prototype.without = function(index){
      var part1 = index > 0 ? this.slice(0,index) : []
      var part2 = this.slice(index+1)
      return part1.concat(part2);
    };
    
  5. without(other)
    Array.prototype.without = function(other) {
      var result = [];
      for(var i = 0; i < this.length; i++)
        if(!other.has(this[i]))
          result.push(this[i]);
      return result;
    };