Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

is-url-http

Kikobeats20kMIT2.3.9TypeScript support: included

Check if an URL is a valid HTTP URL.

boolean, check, http, https, is, url, whatwg

readme

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

changelog

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

2.3.9 (2024-11-04)

2.3.8 (2024-02-15)

2.3.7 (2023-10-24)

2.3.6 (2023-09-05)

2.3.5 (2023-02-01)

2.3.4 (2023-02-01)

2.3.3 (2023-01-31)

2.3.2 (2022-05-17)

2.3.1 (2022-04-28)

2.3.0 (2022-04-27)

Features

  • use url-http as dependency (14f4035)

2.2.14 (2022-04-12)

2.2.13 (2022-04-04)

2.2.12 (2022-03-31)

2.2.11 (2022-03-02)

2.2.10 (2022-02-25)

2.2.9 (2022-02-25)

2.2.8 (2022-02-25)

2.2.7 (2022-01-09)

2.2.6 (2022-01-04)

2.2.5 (2021-11-12)

2.2.4 (2021-07-06)

Bug Fixes

2.2.3 (2021-02-15)

2.2.2 (2020-11-29)

2.2.1 (2020-10-13)

2.2.0 (2020-10-12)

Features

Bug Fixes

2.1.0 (2020-02-05)

  • feat: add lightweight version (d49eea7)

2.0.1 (2020-02-05)

  • Revert "build: remove browser shim" (e9851c2)

2.0.0 (2020-02-03)

  • build: migrate scripts (45c1080)
  • build: remove browser shim (f44f557)

1.2.4 (2019-10-18)

  • refactor: use encoded url (77889a1)

1.2.3 (2019-10-18)

  • test: ensure encoded urls are valid (d934437)

1.2.2 (2019-10-14)

1.2.1 (2019-10-13)

1.2.0 (2019-05-20)

  • feat: detect duplicate protocol (500c0d7)

1.1.3 (2019-03-03)

1.1.2 (2019-02-24)

1.1.1 (2019-02-24)

1.0.2 (2019-02-24)

1.0.1 (2018-09-17)

  • Add more cases (e1496f1), closes #1
  • Update package.json (cb6d17b)
  • Update README.md (6df4758)
  • docs(readme): add Greenkeeper badge (fcf3a95)
  • chore(package): update dependencies (be421d5)

1.0.0 (2018-09-17)