Skip to content

Latest commit

 

History

History
31 lines (17 loc) · 507 Bytes

README.md

File metadata and controls

31 lines (17 loc) · 507 Bytes

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 "hello@world.com" == True

Email Parsing

import Email exposing (parse)


parse "hello@world.com" == Ok { local = "hello", domain = "world.com" } 

toString

import Email exposing (toString)


toString { local = "hello", domain = "world.com" }  == "hello@world.com"