1.0.0 • Published 2 years ago
check-absolute-url v1.0.0
⚙️ Installation
npm i check-absolute-url
CDN Links:
- https://cdn.jsdelivr.net/npm/check-absolute-url@1.0.0/check-absolute-url.js
- https://www.unpkg.com/check-absolute-url@1.0.0/check-absolute-url.js
📖 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]
1.0.0
2 years ago