text: import { Dimensions } from 'react-native';
  export var getUnit = function (str) {
      return str.replace(str.match(/\d+/)[0], '').replace('-', '');
  };
  var dimensionConverter = function (viewport, axis) { return function (target) { return target / 100 * Dimensions.get(viewport)[axis]; }; };
  export var unitConverters = {
      vh: dimensionConverter('window', 'height'),
      vw: dimensionConverter('window', 'width'),
      sh: dimensionConverter('screen', 'height'),
      sw: dimensionConverter('screen', 'width')
  };
  export var convertUnitToPoints = function (target) {
      var unit = getUnit(target);
      var num = parseFloat(target);
      return unitConverters[unit] ? unitConverters[unit](num) : num;
  };
  //# sourceMappingURL=unit-conversion.js.map