First upload version 0.0.1
This commit is contained in:
10
node_modules/@octokit/plugin-throttling/dist-src/route-matcher.js
generated
vendored
Normal file
10
node_modules/@octokit/plugin-throttling/dist-src/route-matcher.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
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
|
||||
};
|
||||
Reference in New Issue
Block a user