lib/command/set.js
function sunionstore(destination /* key-1, key-N, req*/) {
  var args = slice.call(arguments, 1)
    , req = typeof args[args.length-1] === 'object'
      ? args[args.length - 1] : null;
  var list = this.sunion.apply(this, args);
  if(list.length) {
    this.setKey(
      destination, new Set(list), undefined, undefined, undefined, req);
  }
  return list.length;
}
function sunionstore(destination /* key-1, key-N, req*/) {
  var args = slice.call(arguments, 1)
    , req = typeof args[args.length-1] === 'object'
      ? args[args.length - 1] : null;
  var list = this.sunion.apply(this, args);
  if(list.length) {
    this.setKey(
      destination, new Set(list), undefined, undefined, undefined, req);
  }
  return list.length;
}
function sunionstore ( destination /* key-1, key-N, req*/ ) { var args = slice . call ( arguments , 1 ) , req = typeof args [ args . length - 1 ] === 'object' ? args [ args . length - 1 ] : null ; var list = this . sunion . apply ( this , args ) ; if ( list . length ) { this . setKey ( destination , new Set ( list ) , undefined , undefined , undefined , req ) ; } return list . length ; }
Stores the members of the set resulting from the union
of all the given sets.
Stores the members of the set resulting from the union of all the given sets .