21 lines
339 B
TypeScript
21 lines
339 B
TypeScript
/**
|
|
Check if a URL is absolute.
|
|
|
|
@param url - The URL to check.
|
|
|
|
@example
|
|
```
|
|
import isAbsoluteUrl from 'is-absolute-url';
|
|
|
|
isAbsoluteUrl('http://sindresorhus.com/foo/bar');
|
|
//=> true
|
|
|
|
isAbsoluteUrl('//sindresorhus.com');
|
|
//=> false
|
|
|
|
isAbsoluteUrl('foo/bar');
|
|
//=> false
|
|
```
|
|
*/
|
|
export default function isAbsoluteUrl(url: string): boolean;
|