lib/command/database/list/lset.js
function validate(cmd, args, info) {
  AbstractCommand.prototype.validate.apply(this, arguments);
  var index = parseInt(args[1])
    , value = info.db.getKey(args[0], info);
  if(value === undefined) {
    throw NoSuchKey;
  }else if(isNaN(index) || (index < 0 || index >= value.getLength())) {
    throw IndexRange;
  }
  args[1] = index;
}
function validate(cmd, args, info) {
  AbstractCommand.prototype.validate.apply(this, arguments);
  var index = parseInt(args[1])
    , value = info.db.getKey(args[0], info);
  if(value === undefined) {
    throw NoSuchKey;
  }else if(isNaN(index) || (index < 0 || index >= value.getLength())) {
    throw IndexRange;
  }
  args[1] = index;
}
function validate ( cmd , args , info ) { AbstractCommand . prototype . validate . apply ( this , arguments ) ; var index = parseInt ( args [ 1 ] ) , value = info . db . getKey ( args [ 0 ] , info ) ; if ( value === undefined ) { throw NoSuchKey ; } else if ( isNaN ( index ) || ( index < 0 || index >= value . getLength ( ) ) ) { throw IndexRange ; } args [ 1 ] = index ; }
Validate the LSET command.
Validate the LSET command .