0.1.2 • Published 9 months ago

@withe/is-free-email v0.1.2

Weekly downloads
-
License
ISC
Repository
-
Last release
9 months ago

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