function isValidConversion (fromCategoryType, toCategoryType) {
  if (fromCategoryType !== toCategoryType) {
    var errorSnippet =
      fromCategoryType === 'area'
        ? 'an area measurement to a length measurement'
        : 'a length measurement to an area measurement'
    throw new Error(
      `Invalid conversion. You are trying to convert ${errorSnippet}.`
    )
  }
}
/**
 * Utility for checking conversion validity
 * Errors if a length measurement is trying to convert to an area measurement
 * and vice versa
 * @param {string} fromCategoryType the incoming category type i.e. length or area
 * @param {string} toCategoryType the outbound category type i.e. length or area
 */
Utility for checking conversion validity
Errors if a length measurement is trying to convert to an area measurement
and vice versa
@param {string} fromCategoryType the incoming category type i.e. length or area
@param {string} toCategoryType the outbound category type i.e. length or area
Utility for checking conversion validity Errors if a length measurement is trying to convert to an area measurement and vice versa @param { string } fromCategoryType the incoming category type i . e . length or area @param { string } toCategoryType the outbound category type i . e . length or area
function isValidConversion (fromCategoryType, toCategoryType) {
  if (fromCategoryType !== toCategoryType) {
    var errorSnippet =
      fromCategoryType === 'area'
        ? 'an area measurement to a length measurement'
        : 'a length measurement to an area measurement'
    throw new Error(
      `Invalid conversion. You are trying to convert ${errorSnippet}.`
    )
  }
}
function isValidConversion ( fromCategoryType , toCategoryType ) { if ( fromCategoryType !== toCategoryType ) { var errorSnippet = fromCategoryType === 'area' ? 'an area measurement to a length measurement' : 'a length measurement to an area measurement' throw new Error ( ` ${ errorSnippet } ` ) } }
Utility for checking conversion validity
 Errors if a length measurement is trying to convert to an area measurement
 and vice versa
 @param {string} fromCategoryType the incoming category type i.e.
Utility for checking conversion validity Errors if a length measurement is trying to convert to an area measurement and vice versa @param { string } fromCategoryType the incoming category type i . e .