UNPKG

url-lib

Version:

A simple, lightweight string utility for Node and browsers that supports serializing and parsing URLs and query strings.

10 lines (9 loc) 511 B
import { UrlParams } from './types'; /** * Parses query parameters from a string, returning the query parameters as an object. * @param {string} [strToParse=''] - The string from which to parse query parameters * @param {boolean} [favorQuery=true] - Whether or not to treat the full string to parse as query parameters when it doesn't have "?" in it * @returns {UrlParams} Parsed query parameters */ declare const parseQuery: (strToParse?: string, favorQuery?: boolean) => UrlParams; export default parseQuery;