Tweakr
    Preparing search index...

    Function getCookie

    • Retrieves the value of a cookie by name.

      Parameters

      • name: string

        The name of the cookie to retrieve.

      Returns null | string

      The cookie value as a string, or null if not found.

      document.cookie = "sessionId=abc123";
      const value = getCookie("sessionId");
      console.log(value); // "abc123"

      1.1.0