You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

url-exist

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

url-exist

Check if a URL exists.

2.0.2
Source
npm
Version published
Weekly downloads
2.9K
-1.82%
Maintainers
1
Weekly downloads
 
Created
Source

URL Exist Travis CI Build Status

Check if a URL exists.

NPM Badge

Install

npm install url-exist

Improvements over url-exists

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

Usage

const urlExist = require("url-exist");

(async () => {
	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.

Migrating from v1

  • Node.js 10 or later is now required.
  • Support for callbacks have been removed.

Keywords

url

FAQs

Package last updated on 07 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts