1.0.0 • Published 2 years ago

check-absolute-url v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

⚙️ Installation

npm i check-absolute-url

CDN Links:

📖 Usage

▪ Import

// ES6
import checkAbsoluteUrl from "check-absolute-url";

// commonjs
const checkAbsoluteUrl = require("check-absolute-url");

▪ Check with string

const checked = checkAbsoluteUrl('https://www.example.com/path');

console.log(checked); // True

▪ Check with array

const urls = [
    'http://localhost:3000',
    'ftp://ftp.example.com/file.zip',
    '/path',
    'example.com',
    'C:\\path\\to\\file.txt'
];

const checked = checkAbsoluteUrl(urls);

console.log(checked); // [true, true, false, false, false]

Support me on PatreonCheck out my socials