url-exist-sync
Synchronously check if a URL exists.
Last updated 5 months ago by richienb .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install url-exist-sync 
SYNC missed versions from official npm registry.

URL Exists Sync Travis CI Build Status

Synchronously check if a URL exists.

NPM Badge

Use asynchronously

If you are able to run this in an asynchronous context, I highly recommended that you do so with url-exist since synchronous web requests can hang/freeze clients.

Install

npm install url-exist-sync

Usage

const urlExistSync = require("url-exist-sync");

urlExistSync("https://google.com");
//=> true

urlExistSync("https://google.com/404ingURL");
//=> false

urlExistSync("notaurl");
//=> false

API

urlExistSync(url)

url

Type: string

The URL to check.

Related

Current Tags

  • 1.0.2                                ...           latest (5 months ago)

3 Versions

  • 1.0.2                                ...           5 months ago
  • 1.0.1                                ...           5 months ago
  • 1.0.0                                ...           5 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |