Midday / packages /db /src /utils /blocklist.ts
Jules
Final deployment with all fixes and verified content
c09f67c
type BlocklistEntry = {
type: "email" | "domain";
value: string;
};
export function separateBlocklistEntries(entries: BlocklistEntry[]) {
const blockedDomains = entries
.filter((entry) => entry.type === "domain")
.map((entry) => entry.value.toLowerCase());
const blockedEmails = entries
.filter((entry) => entry.type === "email")
.map((entry) => entry.value.toLowerCase());
return {
blockedDomains,
blockedEmails,
};
}