@visulima/disposable-email-domains 1.1.24 → 1.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +30 -18
- package/dist/domains.json +1 -1
- package/dist/edge.d.ts +1 -0
- package/dist/edge.js +6 -0
- package/dist/index.d.ts +11 -2
- package/dist/index.js +1 -1
- package/package.json +8 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## @visulima/disposable-email-domains [1.1.25](https://github.com/visulima/visulima/compare/@visulima/disposable-email-domains@1.1.24...@visulima/disposable-email-domains@1.1.25) (2026-10-14)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **disposable-email-domains,free-email-domains:** resolve disk loaders lazily ([#962](https://github.com/visulima/visulima/issues/962)) ([0b5b734](https://github.com/visulima/visulima/commit/0b5b734e75877903993dc953df381fb5744835d4)), closes [#966](https://github.com/visulima/visulima/issues/966) [#968](https://github.com/visulima/visulima/issues/968)
|
|
6
|
+
|
|
1
7
|
## @visulima/disposable-email-domains [1.1.24](https://github.com/visulima/visulima/compare/@visulima/disposable-email-domains@1.1.23...@visulima/disposable-email-domains@1.1.24) (2026-10-14)
|
|
2
8
|
|
|
3
9
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -54,21 +54,21 @@ pnpm add @visulima/disposable-email-domains
|
|
|
54
54
|
|
|
55
55
|
| Repository | Domains | Success | Performance |
|
|
56
56
|
|------------|---------|---------|-------------|
|
|
57
|
-
| disposable/disposable-email-domains | 98,
|
|
58
|
-
| willwhite/freemail | 88,162 | ✅ | 0.
|
|
59
|
-
| FGRibreau/mailchecker | 56,512 | ✅ | 0.
|
|
60
|
-
| wesbos/burner-email-providers | 27,277 | ✅ | 0.
|
|
61
|
-
| groundcat/disposable-email-domain-list | 21,453 | ✅ | 0.
|
|
62
|
-
| 7c/fakefilter | 10,630 | ✅ | 0.
|
|
57
|
+
| disposable/disposable-email-domains | 98,610 | ✅ | 1.05s (1.5 MB) |
|
|
58
|
+
| willwhite/freemail | 88,162 | ✅ | 0.87s (1.3 MB) |
|
|
59
|
+
| FGRibreau/mailchecker | 56,512 | ✅ | 0.29s (848.5 KB) |
|
|
60
|
+
| wesbos/burner-email-providers | 27,277 | ✅ | 0.10s (388.0 KB) |
|
|
61
|
+
| groundcat/disposable-email-domain-list | 21,453 | ✅ | 0.19s (329.4 KB) |
|
|
62
|
+
| 7c/fakefilter | 10,630 | ✅ | 0.05s (146.1 KB) |
|
|
63
63
|
| sublime-security/static-files | 10,522 | ✅ | 0.05s (144.0 KB) |
|
|
64
|
-
| disposable-email-domains/disposable-email-domains | 9,881 | ✅ | 0.
|
|
65
|
-
| eser/sanitizer-svc | 3,855 | ✅ | 0.
|
|
66
|
-
| unkn0w/disposable-email-domain-list | 3,616 | ✅ | 0.
|
|
67
|
-
| MattKetmo/EmailChecker | 2,515 | ✅ | 0.
|
|
68
|
-
| GeroldSetz/emailondeck.com-domains | 1,121 | ✅ | 0.
|
|
69
|
-
| castle/disposable-email-domains | 1,000 | ✅ | 0.
|
|
70
|
-
| jespernissen/disposable-maildomain-list | 982 | ✅ | 0.
|
|
71
|
-
| TheDahoom/disposable-email | 18 | ✅ | 0.
|
|
64
|
+
| disposable-email-domains/disposable-email-domains | 9,881 | ✅ | 0.53s (139.6 KB) |
|
|
65
|
+
| eser/sanitizer-svc | 3,855 | ✅ | 0.20s (48.9 KB) |
|
|
66
|
+
| unkn0w/disposable-email-domain-list | 3,616 | ✅ | 0.10s (45.7 KB) |
|
|
67
|
+
| MattKetmo/EmailChecker | 2,515 | ✅ | 0.24s (32.4 KB) |
|
|
68
|
+
| GeroldSetz/emailondeck.com-domains | 1,121 | ✅ | 0.14s (15.4 KB) |
|
|
69
|
+
| castle/disposable-email-domains | 1,000 | ✅ | 0.21s (13.1 KB) |
|
|
70
|
+
| jespernissen/disposable-maildomain-list | 982 | ✅ | 0.09s (12.6 KB) |
|
|
71
|
+
| TheDahoom/disposable-email | 18 | ✅ | 0.13s (234 B) |
|
|
72
72
|
|
|
73
73
|
<!-- END_PLACEHOLDER_CONTRIBUTING -->
|
|
74
74
|
<!-- START_PLACEHOLDER_LAST_UPDATED -->
|
|
@@ -161,11 +161,23 @@ extractDomain("User@Example.COM"); // "example.com"
|
|
|
161
161
|
|
|
162
162
|
### Edge / browser / bundled runtimes
|
|
163
163
|
|
|
164
|
-
|
|
164
|
+
For Cloudflare Workers, Next.js middleware/edge and other bundles, import from the `/edge` subpath. It exports the same API as the main entry, but ships the list inside your bundle and registers it for you, so there is no filesystem access and no `setDomains` call:
|
|
165
|
+
|
|
166
|
+
```typescript
|
|
167
|
+
import { isDisposableEmail } from "@visulima/disposable-email-domains/edge";
|
|
168
|
+
|
|
169
|
+
isDisposableEmail("user@mailinator.com"); // true, no setup
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
The list is about 2.8 MB (about 0.9 MB gzipped) of your bundle and cannot be tree-shaken, which is why it is a separate entry: use `/edge` only where you need it, and use the main entry with `setDomains` if you supply your own list.
|
|
173
|
+
|
|
174
|
+
**Using the main entry instead?** By default the package reads `dist/domains.json` from disk via `node:fs`, the first time a lookup needs it. That is not possible in Cloudflare Workers, Next.js middleware/edge, or bundles that relocate `index.js` away from the data file, and in Deno it needs `process.getBuiltinModule`, `import.meta.url` and read permission for the data file. Importing the package is safe everywhere, but when the loader cannot read the list nothing matches the built-in list (only `customDomains` you pass per call still match) and a single warning is logged.
|
|
175
|
+
|
|
176
|
+
Inject the list once at startup with `setDomains` and, since disposable detection is often a signup gate, call `assertListLoaded()` at startup so a missed or failed load throws instead of failing open (`isListLoaded()` is the non-throwing check):
|
|
165
177
|
|
|
166
178
|
```typescript
|
|
167
179
|
import { setDomains, isDisposableEmail } from "@visulima/disposable-email-domains";
|
|
168
|
-
import domains from "@visulima/disposable-email-domains/domains"
|
|
180
|
+
import domains from "@visulima/disposable-email-domains/domains";
|
|
169
181
|
|
|
170
182
|
setDomains(domains);
|
|
171
183
|
|
|
@@ -186,10 +198,10 @@ if (!isListLoaded()) {
|
|
|
186
198
|
|
|
187
199
|
### Raw domain list (`./domains`)
|
|
188
200
|
|
|
189
|
-
The raw, sorted array of disposable domains is
|
|
201
|
+
The raw, sorted array of disposable domains is the default export of the `./domains` subpath. It is a plain ES module, so no JSON import attribute is needed:
|
|
190
202
|
|
|
191
203
|
```typescript
|
|
192
|
-
import domains from "@visulima/disposable-email-domains/domains"
|
|
204
|
+
import domains from "@visulima/disposable-email-domains/domains";
|
|
193
205
|
|
|
194
206
|
console.log(domains.length); // number of disposable domains
|
|
195
207
|
```
|