index.js
function(architectural, units, precision) {
		if (typeof architectural !== "string" && !(architectural instanceof String))
			return false;
		if(architectural.match(/^(([0-9]+)\')?([-\s])*((([0-9]+\")([-\s])*|([0-9]*)([-\s]*)([0-9]+)(\/{1})([0-9]+\")))?$/g) === null)
			return false;
		if(["1", "1/10", "1/100", "1/1000", "1/10000", "1/100000", "1/1000000", "1/10000000"].indexOf(precision) < 0)
			return false;
		if(["inches", "feet"].indexOf(units) < 0)
			return false;
		
		var decimal = 0;
		
		var feet = architectural.match(/^([0-9]+)\'[-\s]*/);
		if(feet !== null)
			decimal += parseInt(feet[1]) * 12;
		
		var inches = architectural.match(/([-\s\']+([0-9]+)|^([0-9]+))[-\s\"]+/);
		if(inches !== null) {
			if(feet !== null)
				decimal += parseInt(inches[2]);
			else
				decimal += parseInt(inches[3]);
		}
		
		var fraction = architectural.match(/([-\s\']+([0-9]+\/[0-9]+)|(^[0-9]+\/[0-9]+))\"/);
		if(fraction !== null) {
			if(feet !== null || inches !== null)
				decimal += divideFraction(fraction[2]);
			else
				decimal += divideFraction(fraction[3]);
		}
		
		if(units !== "inches")
			decimal = decimal / 12;
		
		decimal = roundNumber(decimal, ["1", "1/10", "1/100", "1/1000", "1/10000", "1/100000", "1/1000000", "1/10000000"].indexOf(precision));
		
		return decimal;
	}
function(architectural, units, precision) {
		if (typeof architectural !== "string" && !(architectural instanceof String))
			return false;
		if(architectural.match(/^(([0-9]+)\')?([-\s])*((([0-9]+\")([-\s])*|([0-9]*)([-\s]*)([0-9]+)(\/{1})([0-9]+\")))?$/g) === null)
			return false;
		if(["1", "1/10", "1/100", "1/1000", "1/10000", "1/100000", "1/1000000", "1/10000000"].indexOf(precision) < 0)
			return false;
		if(["inches", "feet"].indexOf(units) < 0)
			return false;
		
		var decimal = 0;
		
		var feet = architectural.match(/^([0-9]+)\'[-\s]*/);
		if(feet !== null)
			decimal += parseInt(feet[1]) * 12;
		
		var inches = architectural.match(/([-\s\']+([0-9]+)|^([0-9]+))[-\s\"]+/);
		if(inches !== null) {
			if(feet !== null)
				decimal += parseInt(inches[2]);
			else
				decimal += parseInt(inches[3]);
		}
		
		var fraction = architectural.match(/([-\s\']+([0-9]+\/[0-9]+)|(^[0-9]+\/[0-9]+))\"/);
		if(fraction !== null) {
			if(feet !== null || inches !== null)
				decimal += divideFraction(fraction[2]);
			else
				decimal += divideFraction(fraction[3]);
		}
		
		if(units !== "inches")
			decimal = decimal / 12;
		
		decimal = roundNumber(decimal, ["1", "1/10", "1/100", "1/1000", "1/10000", "1/100000", "1/1000000", "1/10000000"].indexOf(precision));
		
		return decimal;
	}
function ( architectural , units , precision ) { if ( typeof architectural !== "string" && ! ( architectural instanceof String ) ) return false ; if ( architectural . match ( / ^(([0-9]+)\')?([-\s])*((([0-9]+\")([-\s])*|([0-9]*)([-\s]*)([0-9]+)(\/{1})([0-9]+\")))?$ / g ) === null ) return false ; if ( [ "1" , "1/10" , "1/100" , "1/1000" , "1/10000" , "1/100000" , "1/1000000" , "1/10000000" ] . indexOf ( precision ) < 0 ) return false ; if ( [ "inches" , "feet" ] . indexOf ( units ) < 0 ) return false ; var decimal = 0 ; var feet = architectural . match ( / ^([0-9]+)\'[-\s]* / ) ; if ( feet !== null ) decimal += parseInt ( feet [ 1 ] ) * 12 ; var inches = architectural . match ( / ([-\s\']+([0-9]+)|^([0-9]+))[-\s\"]+ / ) ; if ( inches !== null ) { if ( feet !== null ) decimal += parseInt ( inches [ 2 ] ) ; else decimal += parseInt ( inches [ 3 ] ) ; } var fraction = architectural . match ( / ([-\s\']+([0-9]+\/[0-9]+)|(^[0-9]+\/[0-9]+))\" / ) ; if ( fraction !== null ) { if ( feet !== null || inches !== null ) decimal += divideFraction ( fraction [ 2 ] ) ; else decimal += divideFraction ( fraction [ 3 ] ) ; } if ( units !== "inches" ) decimal = decimal / 12 ; decimal = roundNumber ( decimal , [ "1" , "1/10" , "1/100" , "1/1000" , "1/10000" , "1/100000" , "1/1000000" , "1/10000000" ] . indexOf ( precision ) ) ; return decimal ; }
Convert architectural measurement to decimal notation.

@param {String} architectural
@param {String} units
@param {String} precision
@return {Number}
Convert architectural measurement to decimal notation .