summaryrefslogtreecommitdiff
path: root/bin/wiki/ImportarDesdeURL/node_modules/is-relative-url/readme.md
blob: f7df52f8e4458a44f3408aab62d4d84a6ef6d27b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# is-relative-url [![Build Status](https://travis-ci.org/sindresorhus/is-relative-url.svg?branch=master)](https://travis-ci.org/sindresorhus/is-relative-url)

> Check if an URL is relative


## Install

```
$ npm install is-relative-url
```


## Usage

```js
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](https://github.com/sindresorhus/is-absolute-url) for the inverse.


## License

MIT © [Sindre Sorhus](https://sindresorhus.com)