Files
SnowLuma/.pnpm-store/v11/files/ef/363da43d464c184a2944971b66e713c818378b69aba45a6388e0a79e3cdba5a1a37e8c7a3c49ffa09803403c86394e8fb355d4202f98c838d7d7d71160e223
TanTan 2a69b23b47
Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

22 lines
695 B
Plaintext

Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
require("../../router.js");
//#region src/router/reg-exp-router/matcher.ts
const emptyParam = [];
function match(method, path) {
const matchers = this.buildAllMatchers();
const match = ((method, path) => {
const matcher = matchers[method] || matchers["ALL"];
const staticMatch = matcher[2][path];
if (staticMatch) return staticMatch;
const match = path.match(matcher[0]);
if (!match) return [[], emptyParam];
const index = match.indexOf("", 1);
return [matcher[1][index], match];
});
this.match = match;
return match(method, path);
}
//#endregion
exports.emptyParam = emptyParam;
exports.match = match;