lib/command/keys.js
function renamenx(key, newkey, req) {
  var exists = this.keyExists(newkey);
  if(!exists) {
    this.rename(key, newkey, req);
  }
  return exists ? 0 : 1;
}
function renamenx(key, newkey, req) {
  var exists = this.keyExists(newkey);
  if(!exists) {
    this.rename(key, newkey, req);
  }
  return exists ? 0 : 1;
}
function renamenx ( key , newkey , req ) { var exists = this . keyExists ( newkey ) ; if ( ! exists ) { this . rename ( key , newkey , req ) ; } return exists ? 0 : 1 ; }
Rename a key, only if the new key does not exist.

Expected that the command has validated according the rules for
RENAME.
Rename a key only if the new key does not exist .