Nodejs Array Union union(a, b)

Here you can find the source of union(a, b)

Method Source Code

Array.union = function(a, b){
     return a.concat(b).uniquelize();
};

Related

  1. union(a)
    Array.prototype.union = function(a) {
        return this.concat(a.remove(this));
    
  2. union(arr)
    Array.prototype.union = function (arr) {
      return this.concat(arr).distinct();
    };
    
  3. union(ary)
    Array.prototype.union = function (ary) {
        return this.concat(ary).distinct();
    };
    
  4. union(b)
    Array.prototype.union = function(b) {
      return this.concat(b).uniquelize();
    };
    
  5. union(other)
    Array.prototype.union = function (other) {
      var hash = {};
      for (var i = 0; i < this.length; i++) {
        hash[this[i]] = true;
      for (var j = 0; j < other.length; j++) {
        hash[other[j]] = true;
      return Object.keys(hash);
    ...