jaimito

0.1.1 • Public • Published

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');
 
Jaiminho.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.

Package Sidebar

Install

npm i jaimito

Weekly Downloads

2

Version

0.1.1

License

MIT

Last publish

Collaborators

  • jemaf