Home

Awesome

purescript-email-validate

Build
Status

A small library providing an EmailAddress type. Based on the Haskell library email-validate.

Installing

$ npm install
$ ./node_modules/.bin/bower install purescript-email-validate

Building / Testing

$ pulp build
$ pulp test

Usage

> import Text.Email.Validate (EmailAddress(), toString, emailAddress)
> :t emailAddress
String -> Either String EmailAddress
> emailAddress "test@email.com"
Right test@email.com
> emailAddress "bad@email@address"
Left "bad email address"
> :t toString
EmailAddress -> String
> toString $ emailAddress "test@email.com"
test@email.com