JSPM

is-relative-url

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

Check if an URL is relative

Package Exports

  • is-relative-url

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 (is-relative-url) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

is-relative-url Build Status

Check if an URL is relative

Install

$ npm install --save is-relative-url

Usage

const isRelativeUrl = require('is-relative-url');

isRelativeUrl('foo/bar');
//=> true

isRelativeUrl('http://sindresorhus.com/foo/bar');
//=> false

isRelativeUrl('//sindresorhus.com');
//=> true

See is-absolute-url for the inverse.

License

MIT © Sindre Sorhus