match-bundle.js 571 B

1234567891011121314151617181920
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = matchBundle;
  6. var _getRouteFromAssetPath = _interopRequireDefault(require("../shared/lib/router/utils/get-route-from-asset-path"));
  7. function matchBundle(regex, input) {
  8. const result = regex.exec(input);
  9. if (!result) {
  10. return null;
  11. }
  12. return (0, _getRouteFromAssetPath).default(`/${result[1]}`);
  13. }
  14. function _interopRequireDefault(obj) {
  15. return obj && obj.__esModule ? obj : {
  16. default: obj
  17. };
  18. }
  19. //# sourceMappingURL=match-bundle.js.map