Package

purescript-email-validate

Repository
cdepillabout/purescript-email-validate
License
BSD-3-Clause
Uploaded by
pacchettibotti
Published on
2022-03-12T00:27:39Z

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
Modules
Text.Email.Parser
Text.Email.Validate
Dependencies