goreleaser-action/node_modules/isurl
CrazyMax 730e0e9d77
Update node_modules
2019-11-14 23:36:55 +01:00
..
LICENSE Initial commit 2019-09-20 22:23:46 +02:00
README.md Initial commit 2019-09-20 22:23:46 +02:00
index.js Initial commit 2019-09-20 22:23:46 +02:00
package.json Update node_modules 2019-11-14 23:36:55 +01:00

README.md

isurl NPM Version Build Status

Checks whether a value is a WHATWG URL.

Works cross-realm/iframe and despite @@toStringTag.

Installation

Node.js >= 4 is required. To install, type this at the command line:

npm install isurl

Usage

const isURL = require('isurl');

isURL('http://domain/');  //-> false
isURL(new URL('http://domain/'));  //-> true

Optionally, acceptance can be extended to incomplete URL implementations that lack searchParams (which are common in many modern web browsers):

const url = new URL('http://domain/?query');

console.log(url.searchParams);  //-> undefined

isURL.lenient(url);  //-> true