3.0.1 • Published 2 years ago

url-exist v3.0.1

Weekly downloads
2,342
License
MIT
Repository
github
Last release
2 years ago

URL Exist

Check if a URL exists.

NPM Badge

Install

npm install url-exist

Improvements over url-exists

  • Promise interface.
  • Works cross-platform.
  • Smaller install size.
  • Typescript support included.
  • Catches invalid URLs.
  • Actively maintained.

Usage

import urlExist from "url-exist"

await urlExist("https://google.com")
//=> true

await urlExist("https://google.com/404ingURL")
//=> false
 
await urlExist("notaurl")
//=> false

API

urlExist(url)

url

Type: string

The URL to check.