normalize-mailbox
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

normalize-mailbox

npm version

  • joeblow@gmail.com
  • joe.blow@gmail.com
  • JoE.bLoW@gmail.com
  • j.o.e.b.l.o.w@gmail.com

These are all the same person. This package helps detect this kind of stuff.

Specifically, this package converts all the above forms to the first one--deemed the normalized one.

Unfortunately, the rules differ for each email client. While the above is true for Gmail (until the time of writing), it is not for, for instance, Outlook. This community effort attempts to collect all known client-specific rules into one package.

DISCLAIMER: This is a community-driven effort and BY NO MEANS represent an authoritative source for detecting client-specific email aliases.

Usage

import normalize from 'normalize-mailbox';

const normalized = normalize('JoE.bLoW@gmail.com');
// returns 'joeblow@gmail.com'

Rule sets

Rule sets used to normalize email addresses according to the client are all found in ruleSets.ts.

PRs are always welcome.

Readme

Keywords

Package Sidebar

Install

npm i normalize-mailbox

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

15.9 kB

Total Files

8

Last publish

Collaborators

  • omothm