Skip to main content

getParamsFromURL

Callable

  • getParamsFromURL(url: string): Record<string, string>

  • Extracts search parameters from a URL string and returns them as an object, excluding empty values.

    @example
    getParamsFromURL('https://example.com?query=hello&sort=&page=1');
    // { query: 'hello', page: '1' }