stringify
Function把对象序列化成 query string(自动处理嵌套对象/数组,默认用 `&` 连接、`[]` 表示数组下标)
Signature
function stringify(obj: any, options?: IStringifyOptions<BooleanOptional> | undefined): stringParameters
| Name | Type | Description |
|---|---|---|
| obj | any | — |
| optionsoptional | IStringifyOptions<BooleanOptional> | undefined | — |
Returns
string
Examples
stringify({ a: 1, b: ['x', 'y'] }) // 'a=1&b[0]=x&b[1]=y'Source
node_modules/.pnpm/@types+qs@6.15.1/node_modules/@types/qs/index.d.ts:77