npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript.Learn more »

email-validator-net

2.0.4 • Public • Published

email-validator-net

A small library providing a wrapper for api.email-validator.net

Installation

npm install email-validator-net
# or 
yarn add email-validator-net

Usage

ES6 or TypeScript usage:

import EmailValidator from 'email-validator-net'
 
// YOUR_API_KEY is a string
const validatorInstance = EmailValidator(YOUR_API_KEY)
 
// validatorInstance is a function and takes one argument
// argument must be a string
// validatorInstance returns a promise
const responseObject = await validatorInstance(EMAIL_TO_VALIDATE) // EMAIL_TO_VALIDATE is a string
 
// responseObject looks like this:
// {
//   apiKey,        // used apikey
//   email,         // validated email address
//   statusCode,    // statusCode of the service
//                  // => http://www.email-validator.net/email-verification-results.html
//   statusString,  // status as string
//   fullResponse,  // object with the full response from the service
// }

Tests

yarn test

Release History

  • 2.0.0 Rewrite in Typescript and using Promises
  • 0.1.0 Initial release

install

npm i email-validator-net

Downloadsweekly downloads

32

version

2.0.4

license

MIT

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
Report a vulnerability