@withe/is-free-email
v0.1.2
Published
A utility to check if an email is registered from a free provider
Downloads
2
Readme
Is Free Email
A utility function to check if an email address matches a free email provider.
Usage
JavaScript
import isFreeEmail from '@withe/is-free-email';
const expectTrue = isFreeEmail('[email protected]'); // Returns true
const expectFalse = isFreeEmail('[email protected]'); // Returns false
Go
This package also provides a Go implementation.
package main
import "github.com/withevideo/email"
var expectTrue, _ = email.IsFree("[email protected]"); // Returns true
var expectFalse, _ = email.IsFree("[email protected]"); // Returns false
var _, err = email.IsFree("this_seems_bad"); // err === "invalid email address"
Contributing
Generating freemail.json
$ npm run generate
Testing
$ npm run test
Building
$ npm run build