Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ryanburnette/node-reduce-email-address


https://github.com/ryanburnette/node-reduce-email-address

Last synced: 17 days ago
JSON representation

Awesome Lists containing this project

README

        

# Reduce Email Address

## Concept

Dots and anything after a + are ignored in Gmail addresses.

https://gmail.googleblog.com/2008/03/2-hidden-ways-to-get-more-from-your.html

The most useful case is figuring out that multiple differetiated addresses are actually the same
effective address. For example, `[email protected]` and `[email protected]` are the same effective address
of `[email protected]`.

There are some other services that ignore dots.

https://stackoverflow.com/a/36125463/2535178

http://www.slate.com/blogs/future_tense/2013/08/01/dots_in_gmail_addresses_what_happens_if_you_leave_out_the_period.html

The Wikipedia page has a good breakdown of the email address spec from RFC[something or rather].

https://en.wikipedia.org/wiki/Email_address

Maybe a library that returns the base email address as well as the one provided would be helpful.

## Name

This needs a better name.

## Usage

```javascript
const Email = require('effective-email-address')

// Gmail
let x = '[email protected]'
Email.parse(x)
// { provider: 'gmail', provided: '[email protected]', effective: '[email protected]', extra: 'test' }

// iCloud
let y = '[email protected]'
Email.parse(y)
// { provider: 'icloud', provided: '[email protected]', effective: '[email protected] }

// Facebook
let z = '[email protected]'
Email.parse(z)
// { provider: 'facebook', provided: '[email protected]', effective: '[email protected] }
```

## Contribute

This is a good project to collaborate on because there are many services that handle things differently and it would be nice
to have all the logic in one place.

## Not Yet

This isn't a library yet. Just an idea.