Skip to content

A utility to check if an email is registered from a free provider

License

Notifications You must be signed in to change notification settings

withevideo/email

Repository files navigation

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('someone@gmail.com'); // Returns true
const expectFalse = isFreeEmail('someone@acme.com'); // Returns false

Go

This package also provides a Go implementation.

package main

import "github.com/withevideo/email"

var expectTrue, _ = email.IsFree("someone@gmail.com"); // Returns true
var expectFalse, _ = email.IsFree("someone@acme.com"); // 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

About

A utility to check if an email is registered from a free provider

Resources

License

Stars

Watchers

Forks

Packages

No packages published