is-url-http
TypeScript icon, indicating that this package has built-in type declarations

2.3.8 • Public • Published

is-url-http

Last version Coverage Status NPM Status

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://kiko@beats.com') // ==> 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://kiko@beats.com') // ==> 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

/is-url-http/

    Package Sidebar

    Install

    npm i is-url-http

    Weekly Downloads

    5,292

    Version

    2.3.8

    License

    MIT

    Unpacked Size

    5.76 kB

    Total Files

    6

    Last publish

    Collaborators

    • kikobeats