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

3.0.1 • Public • Published

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.

Package Sidebar

Install

npm i url-exist

Weekly Downloads

3,090

Version

3.0.1

License

MIT

Unpacked Size

3.41 kB

Total Files

6

Last publish

Collaborators

  • richienb