Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
link-exists
Advanced tools
A super lightweight JavaScript / TypeScript library to check whether a given url is valid and exists or not.
A super lightweight JavaScript / TypeScript library to check whether a given url is valid and exists or not.
npm install link-exists
A super lightweight library to validate if a given url is valid or not. Some additional features are-
import { linkExists } from 'link-exists';
const result = await linkExists('https://stackblogger.com');
console.log(result);
// OUTPUT true
const result = await linkExists('https://some-invalid-url.com');
console.log(result);
// OUTPUT false
const result = await linkExists('stackblogger.com');
console.log(result);
// OUTPUT false
// Configuration
const result = await linkExists('stackblogger.com', { ignoreProtocol: true });
console.log(result);
// OUTPUT true
const { linkExists } = require('link-exists');
const result = await linkExists('https://stackblogger.com');
console.log(result);
// OUTPUT true
const result = await linkExists('https://some-invalid-url.com');
console.log(result);
// OUTPUT false
const result = await linkExists('stackblogger.com');
console.log(result);
// OUTPUT false
// Configuration
const result = await linkExists('stackblogger.com', { ignoreProtocol: true });
console.log(result);
// OUTPUT true
FAQs
A super lightweight JavaScript / TypeScript library to check whether a given url is valid and exists or not.
The npm package link-exists receives a total of 41 weekly downloads. As such, link-exists popularity was classified as not popular.
We found that link-exists demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.