Dreamdata Shared Utils & Constants - v1.19.0
    Preparing search index...

    Class URLUtils

    Index

    Constructors

    Methods

    • Adds https:// protocol to a URL if it's missing.

      Parameters

      • url: string

        The URL to check and potentially modify.

      Returns string

      The URL with protocol added if needed.

    • Checks if text contains valid URLs and returns matches.

      Parameters

      • text: string

        The text to search for URLs.

      Returns RegExpMatchArray | null

      Array of matched URLs or null if none found.