src / utils / blockedExtensions.ts
import { BLOCKED_EXTENSIONS } from "./constants";
export function isBlockedExtension(url: string): boolean {
try {
const path = new URL(url).pathname.toLowerCase();
return BLOCKED_EXTENSIONS.some(ext => path.endsWith(ext));
} catch {
return false;
}
}
src / utils / blockedExtensions.ts
import { BLOCKED_EXTENSIONS } from "./constants";
export function isBlockedExtension(url: string): boolean {
try {
const path = new URL(url).pathname.toLowerCase();
return BLOCKED_EXTENSIONS.some(ext => path.endsWith(ext));
} catch {
return false;
}
}