zz_

index.js

thoward37@gmail.com/push-test-1791933020200 / index.js @ dc38bb89 Download
 'use strict';
 var got = require('got');
 
 module.exports = function (url) {
  return got('http://isitup.org/' + url + '.json', {
  json: true,
  headers: {
  'user-agent': 'https://github.com/sindresorhus/is-up'
  }
  }).then(function (res) {
  if (res.body.status_code === 3) {
  throw new Error('Invalid domain');
  }
 
  return res.body.status_code === 1;
  });
 };