page-exists
v1.0.0
Published
Check if a page can be accessed or returns an error code
Downloads
6
Readme
page-exists
Check if a page can be accessed or returns an error code
Installation
$ npm install --save page-exists
Usage
const pageExists = require('page-exists');
pageExists('https://httpstat.us/200').then(
exists => console.log(exists)
); //prints true
pageExists('https://httpstat.us/404'.then(
exists => console.log(exists)
); //prints false
pageExists.many([
'https://httpstat.us/200',
'https://httpstat.us/404',
'https://httpstat.us/500'
]).then(results => console.log(results)); //prints a map of results
About
License
Copyright © 2018, nukeop. Released under the MIT License.