项目作者: byteplant

项目描述 :
NodeJS wrapper for the email-validator.net API
高级语言: TypeScript
项目地址: git://github.com/byteplant/email-validator-net.git
创建时间: 2016-02-18T12:26:59Z
项目社区:https://github.com/byteplant/email-validator-net

开源协议:

下载


email-validator-net

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

Installation

  1. npm install email-validator-net
  2. # or
  3. yarn add email-validator-net

Usage

ES6 or TypeScript usage:

  1. import EmailValidator from 'email-validator-net'
  2. // YOUR_API_KEY is a string
  3. const validatorInstance = EmailValidator(YOUR_API_KEY)
  4. // validatorInstance is a function and takes one argument
  5. // argument must be a string
  6. // validatorInstance returns a promise
  7. const responseObject = await validatorInstance(EMAIL_TO_VALIDATE) // EMAIL_TO_VALIDATE is a string
  8. // responseObject looks like this:
  9. // {
  10. // apiKey, // used apikey
  11. // email, // validated email address
  12. // statusCode, // statusCode of the service
  13. // // => http://www.email-validator.net/email-verification-results.html
  14. // statusString, // status as string
  15. // fullResponse, // object with the full response from the service
  16. // }

Tests

  1. yarn test

Release History

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