2.0.1 • Published 4 years ago

is-valid-http v2.0.1

Weekly downloads
5
License
MIT
Repository
github
Last release
4 years ago

is-valid-http

Last version

Check if a string is a HTTP/HTTPS

Install

$ npm install is-valid-http

Usage

const isUrlCheck = require('is-valid-http');

isUrlCheck('https://example.com'); //=> true
isUrlCheck('http://example.com'); //=> true
isUrlCheck('https://localhost'); //=> true
isUrlCheck('http://localhost'); //=> true
isUrlCheck('example.com'); //=> false
isUrlCheck('https://example'); //=> false
isUrlCheck('ftp://example'); //=> false
isUrlCheck('gopher://example'); //=> false
isUrlCheck('notvalidurl'); // => false