is-relative-url
Check if an URL is relative
Last updated a year ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install is-relative-url 
SYNC missed versions from official npm registry.

is-relative-url Build Status

Check if an URL is relative

Install

$ npm install is-relative-url

Usage

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

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

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

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

Related

See is-absolute-url for the inverse.

License

MIT © Sindre Sorhus

Current Tags

  • 3.0.0                                ...           latest (a year ago)

5 Versions

  • 3.0.0                                ...           a year ago
  • 2.0.0                                ...           5 years ago
  • 1.0.0                                ...           6 years ago
  • 0.1.1                                ...           6 years ago
  • 0.1.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 2
This Week 1,066
This Month 685
Last Day 60
Last Week 825
Last Month 4,280
Dependencies (1)
Dev Dependencies (3)
Dependents (103)

Copyright 2014 - 2016 © taobao.org |