url-exist-sync-browserified
TypeScript icon, indicating that this package has built-in type declarations

2.0.4 • Public • Published

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

import urlExistSync from "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.

Package Sidebar

Install

npm i url-exist-sync-browserified

Weekly Downloads

304

Version

2.0.4

License

MIT

Unpacked Size

163 kB

Total Files

6

Last publish

Collaborators

  • peassuncao1