lib/command/string.js
function setnx(key, value, req) {
  var res = this.setKey(
    key, value, undefined, undefined, Constants.NX, req);
  return res ? 1 : 0;
}
function setnx(key, value, req) {
  var res = this.setKey(
    key, value, undefined, undefined, Constants.NX, req);
  return res ? 1 : 0;
}
function setnx ( key , value , req ) { var res = this . setKey ( key , value , undefined , undefined , Constants . NX , req ) ; return res ? 1 : 0 ; }
Set a key if it does not exist.
Set a key if it does not exist .