Javascript SnippetsAboutAboutContact ↗Contact ↗ (opens in a new tab)
GitHubGitHub (opens in a new tab)
  • Introduction
  • Another Page
  • Array
    • Fill
    • Indexofall
  • Regexp
    • Indentstring
    • Isabsoluteurl
    • Isalpha
  • Key
    • Indexby
    • Indexon
  • Advanced (A Folder)
    • Satori
  • HTML
    • Insertafter
  • Object
    • Invertkeyvalues
    • Isarraylike
  • String
    • Isanagram
  • Introduction
  • Another Page
  • Array
    • Fill
    • Indexofall
  • Regexp
    • Indentstring
    • Isabsoluteurl
      • Example
    • Isalpha
  • Key
    • Indexby
    • Indexon
  • Advanced (A Folder)
    • Satori
  • About
  • Contact ↗ (opens in a new tab)
  • HTML
    • Insertafter
  • Object
    • Invertkeyvalues
    • Isarraylike
  • String
    • Isanagram

On This Page

  • Example
Question? Give us feedback → (opens in a new tab)Edit this page
Regexp
Isabsoluteurl

Check if absolute URL

Checks if the given string is an absolute URL.

  • Use RegExp.prototype.test() to test if the string is an absolute URL.
const isAbsoluteURL = str => /^[a-z][a-z0-9+.-]*:/.test(str);

Example

Last updated on January 31, 2023
IndentstringIsalpha

Nextra Docs Template