urlParams
urlParams(
values):string
Defined in: core/utils/url.ts:18
Returns a query string, ready to append to a URL after ?.
A string is returned as it is, so callers can accept either form. For an
object, each own property becomes a key=value pair with both sides passed
through encodeURIComponent. Properties whose value is null or undefined
are left out.
Parameters
Section titled “Parameters”values
Section titled “values”string | object
A query string, or an object of parameter names and values.
Returns
Section titled “Returns”string
Example
Section titled “Example”urlParams('animal=cat&fruit=apple'); // 'animal=cat&fruit=apple'urlParams({ animal: 'cat', fruit: 'apple' }); // 'animal=cat&fruit=apple'urlParams({ q: 'a b', skip: undefined }); // 'q=a%20b'