API reference@email-utils/classifier
@email-utils/classifier/disposable
The API of the disposable entry point.
Functions
isDisposable()
function isDisposable(email): boolean;Whether the address's domain, or a parent of it, is a known disposable
domain: a@mailinator.com and a@x.mailinator.com both are. The domain is
compared without case, and an internationalized domain by its A-label.
Parameters
| Parameter | Type |
|---|---|
email | string | ParsedAddress |
Returns
boolean
Example
import { isDisposable } from '@email-utils/classifier/disposable';
isDisposable('ada@mailinator.com'); // => true
isDisposable('ada@x.mailinator.com'); // => true
isDisposable('ada@gmail.com'); // => falseThrows
TypeError when email is neither a string nor a parsed address.