Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/cdepillabout/purescript-email-validate

Validating an email address string against RFC 5322
https://github.com/cdepillabout/purescript-email-validate

email email-address-val hacktoberfest purescript

Last synced: about 1 month ago
JSON representation

Validating an email address string against RFC 5322

Awesome Lists containing this project

README

        

purescript-email-validate
==================

[![Build
Status](https://travis-ci.org/cdepillabout/purescript-email-validate.svg)](https://travis-ci.org/cdepillabout/purescript-email-validate)

A small library providing an EmailAddress type. Based on the Haskell library
[email-validate](https://hackage.haskell.org/package/email-validate).

- [Module documentation](docs/Text/Email/)

### Installing

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

### Building / Testing

```sh
$ pulp build
$ pulp test
```

### Usage

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