Skip to content

Latest commit

 

History

History
27 lines (14 loc) · 779 Bytes

buildSearchParams.md

File metadata and controls

27 lines (14 loc) · 779 Bytes

@across-protocol/app-sdk / buildSearchParams

Function: buildSearchParams()

buildSearchParams<T>(params): string

Builds a URL search string from an object of query parameters.

Type Parameters

T extends Record<string, ParamBaseValue | ParamBaseValue[]>

Parameters

params: T

An object where keys are query parameter names and values are either a string or an array of strings representing the parameter values.

Returns

string

queryString - A properly formatted query string for use in URLs, (without the leading '?').

Defined in

packages/sdk/src/utils/fetch.ts:20