isurl

WebJar for isurl

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

isurl
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

isurl
WebJar for isurl
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/stevenvachon/isurl

Download isurl

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/isurl/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>isurl</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/isurl/
implementation 'org.webjars.npm:isurl:1.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/isurl/
implementation ("org.webjars.npm:isurl:1.0.0")
'org.webjars.npm:isurl:jar:1.0.0'
<dependency org="org.webjars.npm" name="isurl" rev="1.0.0">
  <artifact name="isurl" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='isurl', version='1.0.0')
)
libraryDependencies += "org.webjars.npm" % "isurl" % "1.0.0"
[org.webjars.npm/isurl "1.0.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.npm : has-to-string-tag-x jar [1.2.0,2)
org.webjars.npm : is-object jar [1.0.1,2)

Project Modules

There are no modules declared in this project.

isurl NPM Version File Size Build Status Dependency Monitor

Determines whether a value is a WHATWG URL.

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

Installation

Node.js >= 8 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 origin, searchParams and toJSON properties (which are common in many modern web browsers):

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

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

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

Versions

Version
1.0.0