https://github.com/nukeop/page-exists
Check if a page can be accessed or returns an error code
https://github.com/nukeop/page-exists
Last synced: 11 months ago
JSON representation
Check if a page can be accessed or returns an error code
- Host: GitHub
- URL: https://github.com/nukeop/page-exists
- Owner: nukeop
- License: mit
- Created: 2018-05-27T16:46:32.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-27T18:12:33.000Z (about 8 years ago)
- Last Synced: 2025-07-07T08:44:24.643Z (about 1 year ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# page-exists [](https://travis-ci.org/nukeop/page-exists)
> Check if a page can be accessed or returns an error code
## Installation
``` shell
$ npm install --save page-exists
```
## Usage
``` javascript
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](https://github.com/nukeop).
Released under the [MIT License](LICENSE).