1.0.0 • Published 6 years ago

url-exists-async-await v1.0.0

Weekly downloads
3
License
ISC
Repository
-
Last release
6 years ago

url-exists-async-await

A simple node library to determine if a url exists with async await

Usage

const urlExists = require('url-exists-async-await');
 
const urlVal = async(data) => {
  try {
    const result = await urlExists(data);
    console.log(`Result for ${data} is ${result}`);
  } catch(err) {
    console.log(err);
  }
}

urlVal('https://www.google.com'); // true

urlVal('https://www.fakeurl.notreal'); // false