This repository has been archived on 2026-03-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
openclaw-extensions/wecom/node_modules/@octokit/plugin-throttling/dist-src/route-matcher.js
T

11 lines
287 B
JavaScript

function routeMatcher(paths) {
const regexes = paths.map(
(path) => path.split("/").map((c) => c.startsWith("{") ? "(?:.+?)" : c).join("/")
);
const regex = `^(?:${regexes.map((r) => `(?:${r})`).join("|")})[^/]*$`;
return new RegExp(regex, "i");
}
export {
routeMatcher
};