netdown

0.0.1 • Public • Published

Netdown

var netdown = require('netdown'),
    http    = require('http');

var req = http.request({ path: '/', host: 'google.com' });

req.on('error', function(err) {
  if (netdown(err))
    console.log('Network is down!');
  else
    console.log('Some other error: ' + err.message);
})

Install

$ npm install netdown --save

About

Written by Tomás Pollak. (c) Fork, Ltd. MIT Licensed.

Readme

Keywords

none

Package Sidebar

Install

npm i netdown

Weekly Downloads

5

Version

0.0.1

License

MIT

Last publish

Collaborators

  • tomas