Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/neosiae/is-valid-http-url
Check whether a string is a valid HTTP URL
https://github.com/neosiae/is-valid-http-url
http nodejs uri url validation
Last synced: 24 days ago
JSON representation
Check whether a string is a valid HTTP URL
- Host: GitHub
- URL: https://github.com/neosiae/is-valid-http-url
- Owner: neosiae
- License: mit
- Created: 2018-03-02T18:56:12.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T21:46:46.000Z (almost 2 years ago)
- Last Synced: 2024-09-16T02:37:18.083Z (2 months ago)
- Topics: http, nodejs, uri, url, validation
- Language: JavaScript
- Size: 582 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# is-valid-http-url
[![Build Status](https://travis-ci.org/neosiae/is-valid-http-url.svg?branch=master)](https://travis-ci.org/neosiae/is-valid-http-url)
Check whether a string is a valid HTTP URL
This module is based on a [gist](https://gist.github.com/dperini/729294) by [Diego Perini](https://github.com/dperini).
## Install
Install is-valid-http-url using [npm](https://www.npmjs.com):
> npm install --save is-valid-http-url
Or via [yarn](https://yarnpkg.com/en):
> yarn add is-valid-http-url
## Usage
```javascript
const isUrl = require("is-valid-http-url");isUrl("http://example.com"); // true
isUrl("https://www.example.com/foo/?bar=baz&inga=42&quux"); // trueisUrl("example.com"); // false
isUrl("http://foo.bar?q=Spaces should be encoded"); // false
```## License
MIT