goldies
    Preparing search index...

    Function getURLParams

    • Get the URL parameters from a given URL string.

      Parameters

      • url: string

        The URL to extract parameters from.

      Returns Record<string, string>

      The URL parameters as key-value pairs.

      const url = 'https://example.com?param1=value1&param2=value2';
      // returns { param1: 'value1', param2: 'value2' }
      const params = getUrlParams(url);

      Use Object.fromEntries(new URL(url).searchParams), which this returns. Will be removed in goldies 6.0.