JS Utils Kit - v0.5.1
    Preparing search index...

    Function isURL

    • Checks whether a given string is a valid absolute URL.

      This function uses the native URL constructor to determine if the input is a valid, absolute URL with a supported protocol (e.g., http, https, ftp, etc.).

      Parameters

      • value: string

        The string to validate as a URL.

      Returns boolean

      • true if the string is a valid absolute URL; otherwise, false.
      isURL('https://example.com'); // true
      isURL('ftp://files.example.com'); // true
      isURL('invalid-url'); // false
      isURL('/relative/path'); // false