Validate URLs for sane values
ISC License
is-http-url
Validate URLs for sane values
npm install is-http-url
Does the following:
http:
or https:
Example usage could be to validate the Origin
or Referer
HTTP headers
const assert = require('assert')
const isHttpUrl = require('is-http-url')
assert.ok(isHttpUrl('http://example.com/hello-world.txt'))
assert.notOk(isHttpUrl('//test'))
Type: String