Nonviolent Pigeon Manifestation

    good-mail
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.4 • Public • Published

    Good mail

    good-mail is a fast email validator with a domain exclusion option.
    You can exclude domain that give temporary or throwalble email adresses. A list of such providers can be find in the project.

    Get it running

    Run npm install good-mail to install the package.

    How to use

    Require

    Require the package :

    Javascript

    const gm = require('good-mail');

    Typescript

    import * as gm from 'good-mail';

    Usage

    If you just want to validate an email:

    gm.validate('test@email.com');

    The method returns a boolean: true if the email is valid, false otherwise.

    If you want to exclude certain domain names, pass them in an array of strings as second parameter.

    const excludedDomains = ['trashmail.com', 'yopmail.com', 'spam.com'];
    gm.validate('test@email.com', excludedDomains);

    You can find a list of disposable email providers in the project, or check the list online.

    Unit tests

    Run the tests with npm run test

    tests

    Coverage & report

    See the code coverage with npm run coverage

    Once you run the tests, you can check the coverage report with npm run report

    coverage

    Install

    npm i good-mail

    DownloadsWeekly Downloads

    8

    Version

    1.0.4

    License

    ISC

    Last publish

    Collaborators

    • mkspcd