JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1756072
  • Score
    100M100P100Q189724F
  • License MIT

Checks whether a value is a WHATWG URL.

Package Exports

  • isurl

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (isurl) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

isurl NPM Version Build Status

Checks whether a value is a WHATWG URL.

Works cross-realm/iframe.

Installation

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

npm install isurl

Usage

const isURL = require('isurl');
const assert = require('assert');
 
assert.equal(isURL('http://domain/'), false);
assert.equal(isURL(new URL('http://domain/')), true);