pxtoFactory = function pxtoFactory(to) {
    return function (pxval, base) {
      if (base === void 0) {
        base = '16px';
      }
      var newPxval = pxval;
      var newBase = base;
      if (typeof pxval === 'string') {
        if (!endsWith(pxval, 'px')) {
          throw new PolishedError(69, to, pxval);
        }
        newPxval = stripUnit(pxval);
      }
      if (typeof base === 'string') {
        if (!endsWith(base, 'px')) {
          throw new PolishedError(70, to, base);
        }
        newBase = stripUnit(base);
      }
      if (typeof newPxval === 'string') {
        throw new PolishedError(71, pxval, to);
      }
      if (typeof newBase === 'string') {
        throw new PolishedError(72, base, to);
      }
      return "" + newPxval / newBase + to;
    };
  }
Factory function that creates pixel-to-x converters
@private