function parseDimensions(dimensionsStr) {
  const dimensions = dimensionsStr
    ? dimensionsStr.match(/(\d{2})(\d)?x(\d{2})(\d)?$/)
    : null;

  if (!dimensions) {
    return null;
  }

  return {
    width: parseFloat(
      dimensions[1] + (dimensions[2] ? `.${dimensions[2]}` : '')
    ),
    height: parseFloat(
      dimensions[3] + (dimensions[4] ? `.${dimensions[4]}` : '')
    ),
    unit: 'CENTIMETER',
  };
}
Parse the CBL dimensions format into a proper object.

@param {string} dimensionsStr The CBL dimensions.
@returns A object with width and height if valid.