1.0.0 • Published 6 years ago

page-exists v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

page-exists Build Status

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.