lib/command/database/string/bitcount.js
function validate(cmd, args, info) {
  AbstractCommand.prototype.validate.apply(this, arguments);
  var start
    , end;

  if(args.length !== 1 && args.length !== 3) {
    throw new CommandArgLength(cmd);
  }

  if(args.length > 1) {
    start = parseInt('' + args[1]);
    if(isNaN(start)) throw IntegerRange;
    args[1] = start;
    end = parseInt('' + args[2]);
    if(isNaN(end)) throw IntegerRange;
    args[2] = end;
  }
}
function validate(cmd, args, info) {
  AbstractCommand.prototype.validate.apply(this, arguments);
  var start
    , end;

  if(args.length !== 1 && args.length !== 3) {
    throw new CommandArgLength(cmd);
  }

  if(args.length > 1) {
    start = parseInt('' + args[1]);
    if(isNaN(start)) throw IntegerRange;
    args[1] = start;
    end = parseInt('' + args[2]);
    if(isNaN(end)) throw IntegerRange;
    args[2] = end;
  }
}
function validate ( cmd , args , info ) { AbstractCommand . prototype . validate . apply ( this , arguments ) ; var start , end ; if ( args . length !== 1 && args . length !== 3 ) { throw new CommandArgLength ( cmd ) ; } if ( args . length > 1 ) { start = parseInt ( '' + args [ 1 ] ) ; if ( isNaN ( start ) ) throw IntegerRange ; args [ 1 ] = start ; end = parseInt ( '' + args [ 2 ] ) ; if ( isNaN ( end ) ) throw IntegerRange ; args [ 2 ] = end ; } }
Validate the BITCOUNT command.
Validate the BITCOUNT command .