lib/type/zset.js
function zadd(members) {
  var i
    , c = 0
    , score
    , member;
  for(i = 0;i < members.length;i+=2) {
    score = members[i];
    if(INFINITY[score] !== undefined) {
      score = INFINITY[score];
    }
    member = members[i + 1];
    if(this.zrank(member) === null) {
      c++;
    }
    // this will add or update the score
    this.setKey(member, score);
  }
  return c;
}
function zadd(members) {
  var i
    , c = 0
    , score
    , member;
  for(i = 0;i < members.length;i+=2) {
    score = members[i];
    if(INFINITY[score] !== undefined) {
      score = INFINITY[score];
    }
    member = members[i + 1];
    if(this.zrank(member) === null) {
      c++;
    }
    // this will add or update the score
    this.setKey(member, score);
  }
  return c;
}
function zadd ( members ) { var i , c = 0 , score , member ; for ( i = 0 ; i < members . length ; i += 2 ) { score = members [ i ] ; if ( INFINITY [ score ] !== undefined ) { score = INFINITY [ score ] ; } member = members [ i + 1 ] ; if ( this . zrank ( member ) === null ) { c ++ ; } // this will add or update the score this . setKey ( member , score ) ; } return c ; }
Adds all the specified members with the specified
scores to the sorted set.
Adds all the specified members with the specified scores to the sorted set .