kaven-basic - v6.0.0
    Preparing search index...

    Function ParseQueryParameters

    • Parses the query parameters from a given URL string and returns them as an object.

      Parameters

      • url: string

        The URL string from which to extract query parameters. If the string does not contain a query part, it is treated as the query string itself.

      • OptionaluriDecodeMethod: TUriDecodeFunction

        (Optional) A function to decode URI components. If provided, both parameter names and values will be decoded using this method.

      Returns TStringObject<TStringOrUndefined>

      An object mapping parameter names to their corresponding values, or undefined if a parameter has no value.

      const params = ParseQueryParameters('https://example.com/?foo=bar&baz');
      // params = { foo: 'bar', baz: undefined }

      2.0.7

      2020-06-24