is-url-http
v2.3.9
Published
Check if an URL is a valid HTTP URL.
Downloads
13,468
Maintainers
Readme
is-url-http
Check if an URL is a valid HTTP URL.
Install
$ npm install is-url-http --save
Usage
const isUrlHttp = require('is-url-http')
isUrlHttp('https://kikobeats.com') // ==> true
isUrlHttp('https://kikobeats.com') // ==> true
isUrlHttp('mailto://[email protected]') // ==> false
isUrlHttp('callto:192.168.103.77+type=ip') // ==> false
If you need to run the package in a browser environment, you can save some bytes using the lightweight version:
const isUrlHttp = require('is-url-http/lightweight')
isUrlHttp('https://kikobeats.com') // ==> true
isUrlHttp('https://kikobeats.com') // ==> true
isUrlHttp('mailto://[email protected]') // ==> false
isUrlHttp('callto:192.168.103.77+type=ip') // ==> false
License
is-url-http © Kiko Beats, released under the MIT License. Authored and maintained by Kiko Beats with help from contributors.
kikobeats.com · GitHub Kiko Beats · Twitter @Kikobeats