Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/panthershark/email-parser
- Owner: panthershark
- License: bsd-3-clause
- Created: 2019-12-18T03:16:16.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-11T16:18:18.000Z (about 4 years ago)
- Last Synced: 2024-04-15T14:27:03.700Z (9 months ago)
- Language: Elm
- Size: 12.7 KB
- Stars: 4
- Watchers: 3
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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]"
```