Package Exports
- link-exists
- link-exists/dist/index.esm.js
- link-exists/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (link-exists) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
link-exists
A simple JavaScript / TypeScript library to check whether a given url is valid and exists or not.
Installation
npm install link-existsUsage (TypeScript)
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 falseUsage (JavaScript)
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