code: function cast(type, variable) {
  		var result = variable;
  
  		switch (type) {
  			case 'number':
  				result = +result;
  				break;
  
  			case 'int':
  				result = parseInt(result, 10);
  				break;
  
  			case 'float':
  				result = parseFloat(result);
  				break;
  
  			case 'bool':
  			case 'boolean':
  				result = ['true', '1', 1].indexOf(result) >= 0;
  				break;
  		}
  
  		return result;
  	}
docs: Cast variable to given type
  @name    cast
  @access  internal
  @param   string type
  @param   string value
  @return  mixed  value