isAbsoluteUrl.js 175 B

1234
  1. module.exports = function isAbsoluteUrl (url) {
  2. // A URL is considered absolute if it begins with "<scheme>://" or "//"
  3. return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url)
  4. }