aboutsummaryrefslogtreecommitdiff
path: root/src/shared/blacklists.ts
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2019-10-07 12:54:32 +0000
committerGitHub <noreply@github.com>2019-10-07 12:54:32 +0000
commit8eddcc1785a85bbe74be254d1055ebe5125dad10 (patch)
treef3f51320d12a90a1b421ed8b1f811c576996ea8e /src/shared/blacklists.ts
parent7fc2bb615f530fc6adfade54b9553568f5d50ceb (diff)
parentb77a4734985722e96066e713f3b1b9e81a6e1811 (diff)
Merge pull request #654 from ueokande/settings-as-a-class
Refactor settings on shared logics
Diffstat (limited to 'src/shared/blacklists.ts')
-rw-r--r--src/shared/blacklists.ts13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/shared/blacklists.ts b/src/shared/blacklists.ts
deleted file mode 100644
index 61ee4de..0000000
--- a/src/shared/blacklists.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import * as re from './utils/re';
-
-const includes = (blacklist: string[], url: string): boolean => {
- let u = new URL(url);
- return blacklist.some((item) => {
- if (!item.includes('/')) {
- return re.fromWildcard(item).test(u.host);
- }
- return re.fromWildcard(item).test(u.host + u.pathname);
- });
-};
-
-export { includes };