site/node_modules/is-absolute-url/readme.md

41 lines
863 B
Markdown
Raw Permalink Normal View History

2024-10-14 06:09:33 +00:00
# is-absolute-url
> Check if a URL is absolute
## Install
```
$ npm install is-absolute-url
```
## Usage
```js
import isAbsoluteUrl from 'is-absolute-url';
isAbsoluteUrl('https://sindresorhus.com/foo/bar');
//=> true
isAbsoluteUrl('//sindresorhus.com');
//=> false
isAbsoluteUrl('foo/bar');
//=> false
```
## Related
See [is-relative-url](https://github.com/sindresorhus/is-relative-url) for the inverse.
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-is-absolute-url?utm_source=npm-is-absolute-url&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>