About
A small package with one job: keep throwaway emails out.
SpamNull is an open-source library for detecting disposable email addresses and spam domains. Every check happens inside your own process — there is no API to call and no address ever leaves your infrastructure.
215,822 usable domains
after whitelist filtering
ESM + CJS + TypeScript
types included
100% local detection
no external API
MIT licensed on npm
Why it exists
Signup forms, comment boxes and trial flows attract throwaway inboxes. Most existing solutions answer that with a paid lookup service: you send them every address your users type, and you wait on a network round-trip in a hot path. SpamNull takes the opposite approach — ship the dataset with the package and answer locally.
How the dataset is built
SpamNull bundles a curated blocklist of disposable and spam-associated domains. Before shipping, that list is filtered against a whitelist of known-good mail providers so that everyday addresses aren't caught by accident. Version 2.0.0 ships 215,822 usable domains after that filtering step.
Design principles
- Local first — detection is a single in-process lookup, with no DNS or HTTP calls.
- Private by default — no telemetry, no third-party requests, nothing logged remotely.
- Tiny surface — one function,
isSpam, as both default and named export. - Honest about limits — a blocklist is a signal, not proof. Pair it with your own verification.
Responsible use
No blocklist is perfect. Use SpamNull as one input among several, keep an appeal path for people who are wrongly flagged, and avoid permanently blocking accounts on a single heuristic.
Open source & contact
SpamNull is MIT licensed. The source lives on GitHub and releases are published on npm. Questions, missed domains or false positives: [email protected].