dist/jcanvas.js
function _coerceNumericProps(props) {
	var propName, propType, propValue;
	// Loop through all properties in given property map
	for (propName in props) {
		if (Object.prototype.hasOwnProperty.call(props, propName)) {
			propValue = props[propName];
			propType = typeOf(propValue);
			// If property is non-empty string and value is numeric
			if (propType === 'string' && isNumeric(propValue) && propName !== 'text') {
				// Convert value to number
				props[propName] = parseFloat(propValue);
			}
		}
	}
	// Ensure value of text property is always a string
	if (props.text !== undefined) {
		props.text = String(props.text);
	}
}
function _coerceNumericProps(props) {
	var propName, propType, propValue;
	// Loop through all properties in given property map
	for (propName in props) {
		if (Object.prototype.hasOwnProperty.call(props, propName)) {
			propValue = props[propName];
			propType = typeOf(propValue);
			// If property is non-empty string and value is numeric
			if (propType === 'string' && isNumeric(propValue) && propName !== 'text') {
				// Convert value to number
				props[propName] = parseFloat(propValue);
			}
		}
	}
	// Ensure value of text property is always a string
	if (props.text !== undefined) {
		props.text = String(props.text);
	}
}
function _coerceNumericProps ( props ) { var propName , propType , propValue ; // Loop through all properties in given property map for ( propName in props ) { if ( Object . prototype . hasOwnProperty . call ( props , propName ) ) { propValue = props [ propName ] ; propType = typeOf ( propValue ) ; // If property is non-empty string and value is numeric if ( propType === 'string' && isNumeric ( propValue ) && propName !== 'text' ) { // Convert value to number props [ propName ] = parseFloat ( propValue ) ; } } } // Ensure value of text property is always a string if ( props . text !== undefined ) { props . text = String ( props . text ) ; } }
Coerce designated number properties from strings to numbers
Coerce designated number properties from strings to numbers