src/cal-heatmap.js
function validateDomainType() {
			if (!parent._domainType.hasOwnProperty(options.domain) || options.domain === "min" || options.domain.substring(0, 2) === "x_") {
				throw new Error("The domain '" + options.domain + "' is not valid");
			}

			if (!parent._domainType.hasOwnProperty(options.subDomain) || options.subDomain === "year") {
				throw new Error("The subDomain '" + options.subDomain + "' is not valid");
			}

			if (parent._domainType[options.domain].level <= parent._domainType[options.subDomain].level) {
				throw new Error("'" + options.subDomain + "' is not a valid subDomain to '" + options.domain +  "'");
			}

			return true;
		}
function validateDomainType() {
			if (!parent._domainType.hasOwnProperty(options.domain) || options.domain === "min" || options.domain.substring(0, 2) === "x_") {
				throw new Error("The domain '" + options.domain + "' is not valid");
			}

			if (!parent._domainType.hasOwnProperty(options.subDomain) || options.subDomain === "year") {
				throw new Error("The subDomain '" + options.subDomain + "' is not valid");
			}

			if (parent._domainType[options.domain].level <= parent._domainType[options.subDomain].level) {
				throw new Error("'" + options.subDomain + "' is not a valid subDomain to '" + options.domain +  "'");
			}

			return true;
		}
function validateDomainType ( ) { if ( ! parent . _domainType . hasOwnProperty ( options . domain ) || options . domain === "min" || options . domain . substring ( 0 , 2 ) === "x_" ) { throw new Error ( "The domain '" + options . domain + "' is not valid" ) ; } if ( ! parent . _domainType . hasOwnProperty ( options . subDomain ) || options . subDomain === "year" ) { throw new Error ( "The subDomain '" + options . subDomain + "' is not valid" ) ; } if ( parent . _domainType [ options . domain ] . level <= parent . _domainType [ options . subDomain ] . level ) { throw new Error ( "'" + options . subDomain + "' is not a valid subDomain to '" + options . domain + "'" ) ; } return true ; }
Ensure that the domain and subdomain are valid

@throw {Error} when domain or subdomain are not valid
@return {bool} True if domain and subdomain are valid and compatible
Ensure that the domain and subdomain are valid