1.0.7 • Published 7 years ago

promised-url-exists v1.0.7

Weekly downloads
16
License
MIT
Repository
github
Last release
7 years ago

promised-url-exists

A simple node library to determine if an url exists, now with native promises. Forked from this

Usage

var urlExists = require('promised-url-exists');

urlExists('https://www.google.com')
  .then(({exists}) => {
    console.log(exists); // true
  })
  .catch(error => {
    console.log(error);
  });

urlExists('https://www.fakeurl.notreal')
  .then(({exists}) => {
    console.log(exists); // false
  })
  .catch(error => {
    console.log(error);
  });