Phasmid: provider-aware email normalization and canonicalization.
import { normalizeEmail, isSameEmail } from "Phasmid";normalizeEmail("John.Doe+newsletter@googlemail.com"); // "johndoe@gmail.com"isSameEmail("a.b@gmail.com", "ab@gmail.com"); // true Copy
import { normalizeEmail, isSameEmail } from "Phasmid";normalizeEmail("John.Doe+newsletter@googlemail.com"); // "johndoe@gmail.com"isSameEmail("a.b@gmail.com", "ab@gmail.com"); // true
Returns true if two addresses are both valid and normalize to the same canonical address, i.e. they deliver to the same mailbox under the configured rules. Invalid input never matches anything, itself included.
true
Optional
Phasmid: provider-aware email normalization and canonicalization.
Example