1 | # is-relative-url [![Build Status](https://travis-ci.org/sindresorhus/is-relative-url.svg?branch=master)](https://travis-ci.org/sindresorhus/is-relative-url)
|
2 |
|
3 | > Check if an URL is relative
|
4 |
|
5 |
|
6 | ## Install
|
7 |
|
8 | ```sh
|
9 | $ npm install --save is-relative-url
|
10 | ```
|
11 |
|
12 |
|
13 | ## Usage
|
14 |
|
15 | ```js
|
16 | var isRelativeUrl = require('is-relative-url');
|
17 |
|
18 | isRelativeUrl('foo/bar');
|
19 | //=> true
|
20 |
|
21 | isRelativeUrl('http://sindresorhus.com/foo/bar');
|
22 | //=> false
|
23 | ```
|
24 |
|
25 |
|
26 | ## Related
|
27 |
|
28 | See [is-absolute-url](https://github.com/sindresorhus/is-absolute-url) for the inverse.
|
29 |
|
30 |
|
31 | ## License
|
32 |
|
33 | MIT © [Sindre Sorhus](http://sindresorhus.com)
|