index.d.ts 363 B

12345678910111213141516171819202122
  1. /**
  2. Check if a URL is absolute.
  3. @param url - The URL to check.
  4. @example
  5. ```
  6. import isAbsoluteUrl = require('is-absolute-url');
  7. isAbsoluteUrl('http://sindresorhus.com/foo/bar');
  8. //=> true
  9. isAbsoluteUrl('//sindresorhus.com');
  10. //=> false
  11. isAbsoluteUrl('foo/bar');
  12. //=> false
  13. ```
  14. */
  15. declare function isAbsoluteUrl(url: string): boolean;
  16. export = isAbsoluteUrl;