Skip to content

jemaf/jaimito

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jaimito

version license Build Status Coverage Status

Jaimito is an email validator library written in JavaScript. The library validates the email by checking its hostname on Mail Exchange (MX) records.

Installing

Jaimito is available via npm

$ npm install jaimito

Basic Usage

Using Jaimito is really simple: all you have to do is call the validate function.

To validate an email, you must provide the email itself and the callback that will be executed after its validation.

const Jaimito = require('jaimito');

Jaimito.validate('yourEmail@gmail.com', function(err, res) {
    if(err) {
        // unexpected error
    }

    if(res) {
        // valid email
    } else {
        // invalid email
    }
});

Jaimito is also available for use with Promises:

const Jaimito = require('jaimito');

Jaimito
.validate('yourEmail@gmail.com')
.then(res => {
    if(res) {
        // valid email
    } else {
        // invalid email
    }
})
.catch(err => {
    // unexpected error
});

Why Jaimito?

Different from traditional email validators, Jaimito also checks wether the provided hostname is real. For this, the email domain is verified on Mail Exchange records.

Who is Jaimito?

Es que quiero evitar la fatiga

-- Jaimito, el cartero

Jaimito is an old postman character from El Chavo del Ocho show. The character is know for its lazyness and for avoiding any task.

About

JavaScript e-mail validator.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •