Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

neverbounce

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

neverbounce

An API wrapper for the NeverBounce API

  • 0.2.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.3K
increased by33.73%
Maintainers
1
Weekly downloads
 
Created
Source

NeverBounce API NodeJS Wrapper

Build Status

This is the official NeverBounce API NodeJS wrapper. It provides helpful methods to quickly implement our API in your NodeJS applications.

Installation

To install use the following command

$ npm install neverbounce --save

Usage

To start using the wrapper sign up for an account here and get your api keys here. This wrapper utilizes ES6 Promises to handle the API calls.

To initialize the wrapper use the following snippet, substituting in your api key and api secrete key...

var NeverBounce = require('neverbounce')({
    apiKey: API_KEY,
    apiSecret: API_SECRET_KEY
});

You can now access the verify method from this object. To validate a single email use the following...

NeverBounce.single.verify(EMAIL_TO_VALIDATE).then(
    function(result) {
        // do stuff
    },
    function(error) {
        // errors will bubble up through the reject method of the promise.
        // you'll want to console.log them otherwise it'll fail silently
    }
);

The result returned in from the verification promise will be a Result object. It provides several helper methods documented below...

result.getResult(); // Numeric result code; ex: 0, 1, 2, 3, 4
result.getResultTextCode(); // Textual result code; ex: valid, invalid, disposable, catchall, unknown
result.is(0); // Returns true if result is valid
result.is([0,3,4]); // Returns true if result is valid, catchall, or unknown
result.not(1); // Returns true if result is not invalid
result.not([1,2]); // Returns true if result is not invalid or disposable

Keywords

FAQs

Package last updated on 04 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc