Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including email-validator-net with all npm packages installed. Try it out:

var emailValidatorNet = require("email-validator-net")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

email-validator-net v2.0.5

A wrapper for api.email-validator.net

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
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free