function parseNumber(value, places) {
	var intValue = parseInt(value, 10);
	var floatValue = parseFloat(value);
	var number = (intValue == floatValue) ? intValue : floatValue;
	if(isNaN(number) || !isFinite(number)) {
		throw "UnexpectedValueException: \"" + value + "\"";
	}
	if(typeof places === "number") number = parseFloat(number.toFixed(places));
	return number;
}
/*
 Parses a string-represented integer or float, optionally rounds to number
 of decimal places given by places
*/
Parses a string-represented integer or float, optionally rounds to number
of decimal places given by places
Parses a string - represented integer or float optionally rounds to number of decimal places given by places
function parseNumber(value, places) {
	var intValue = parseInt(value, 10);
	var floatValue = parseFloat(value);
	var number = (intValue == floatValue) ? intValue : floatValue;
	if(isNaN(number) || !isFinite(number)) {
		throw "UnexpectedValueException: \"" + value + "\"";
	}
	if(typeof places === "number") number = parseFloat(number.toFixed(places));
	return number;
}
function parseNumber ( value , places ) { var intValue = parseInt ( value , 10 ) ; var floatValue = parseFloat ( value ) ; var number = ( intValue == floatValue ) ? intValue : floatValue ; if ( isNaN ( number ) || ! isFinite ( number ) ) { throw "UnexpectedValueException: \"" + value + "\"" ; } if ( typeof places === "number" ) number = parseFloat ( number . toFixed ( places ) ) ; return number ; }
Parses a string-represented integer or float, optionally rounds to number
of decimal places given by places
Parses a string - represented integer or float optionally rounds to number of decimal places given by places