lib/command/string.js
function append(key, value, req) {
  var val = this.getKey(key, req)
    , str = typeof val === 'string';
  // doesn't exist becomes the empty string
  if(val === undefined) val = new Buffer('');
  if(!(val instanceof Buffer)) val = new Buffer('' + val);
  if(!(value instanceof Buffer)) value = new Buffer('' + value);
  // coerce numbers to strings
  //val = (val + '') + value;
  //val = val.concat()
  val = Buffer.concat([val, value], val.length + value.length);
  if(str) val = val.toString();
  this.setKey(key, val, undefined, undefined, undefined, req);
  return str ? Buffer.byteLength(val) : val.length;
}
function append(key, value, req) {
  var val = this.getKey(key, req)
    , str = typeof val === 'string';
  // doesn't exist becomes the empty string
  if(val === undefined) val = new Buffer('');
  if(!(val instanceof Buffer)) val = new Buffer('' + val);
  if(!(value instanceof Buffer)) value = new Buffer('' + value);
  // coerce numbers to strings
  //val = (val + '') + value;
  //val = val.concat()
  val = Buffer.concat([val, value], val.length + value.length);
  if(str) val = val.toString();
  this.setKey(key, val, undefined, undefined, undefined, req);
  return str ? Buffer.byteLength(val) : val.length;
}
function append ( key , value , req ) { var val = this . getKey ( key , req ) , str = typeof val === 'string' ; // doesn't exist becomes the empty string if ( val === undefined ) val = new Buffer ( '' ) ; if ( ! ( val instanceof Buffer ) ) val = new Buffer ( '' + val ) ; if ( ! ( value instanceof Buffer ) ) value = new Buffer ( '' + value ) ; // coerce numbers to strings //val = (val + '') + value; //val = val.concat() val = Buffer . concat ( [ val , value ] , val . length + value . length ) ; if ( str ) val = val . toString ( ) ; this . setKey ( key , val , undefined , undefined , undefined , req ) ; return str ? Buffer . byteLength ( val ) : val . length ; }
Append a value to a key.
Append a value to a key .