1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | function toRegxp(pattern) {
|
4 | const matched = pattern.match(/^\/(.+)\/([ig]*)$/i);
|
5 | if (matched) {
|
6 | return new RegExp(matched[1], matched[2]);
|
7 | }
|
8 | return pattern;
|
9 | }
|
10 | exports.toRegxp = toRegxp;
|