Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/panthershark/email-parser

Elm module for parsing and validating email addresses
https://github.com/panthershark/email-parser

Last synced: about 2 months ago
JSON representation

Elm module for parsing and validating email addresses

Awesome Lists containing this project

README

        

# Email Parser

A library for validating and parsing email addresses respecting RFC 5321 and RFC 5322. It uses `elm/parser` under the covers.

### Email Validation

```
import Email exposing (isValid)

isValid "[email protected]" == True
```

### Email Parsing

```
import Email exposing (parse)

parse "[email protected]" == Ok { local = "hello", domain = "world.com" }
```

### toString

```
import Email exposing (toString)

toString { local = "hello", domain = "world.com" } == "[email protected]"
```