code: function num(type, value) {
    var val;
    if(type === NUMERIC.INTEGER) {
      val = utils.strtoint(value);
      if(isNaN(val)) throw IntegerRange;
    }else{
      val = utils.strtofloat(value);
      if(isNaN(val)) throw InvalidFloat;
    }
    return val;
  }
docs: Helper for testing numeric types.
  
  Throws an error if the coerced type is NaN.
  
  @param type The type constant.
  @param value The value to test.
  
  @return The coerced value.