Initalize

This commit is contained in:
Your Name
2026-05-03 12:12:57 -04:00
commit 38652eb9b5
10603 changed files with 1762136 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
export default function(path, domains = []) {
// filter out non-strings
domains = domains.filter(domain => typeof domain === 'string');
// separate out strings and regex
const regexers = domains.map(domain => new RegExp(domain)) ?? [];
return false
|| domains.find(domain => path.startsWith(domain)) !== undefined
|| regexers.map(regexer => regexer.test(path)).find(matched => matched === true) !== undefined;
}