is-valid-http

2.0.1 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.1
    384
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.1
    384
  • 2.0.0
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i is-valid-http

Weekly Downloads

384

Version

2.0.1

License

MIT

Unpacked Size

4.05 kB

Total Files

4

Last publish

Collaborators

  • securityresearch_bugz