@types/qs

  • Version 6.9.12
  • Published
  • 6.4 kB
  • No dependencies
  • MIT license

Install

npm i @types/qs
yarn add @types/qs
pnpm add @types/qs

Overview

TypeScript definitions for qs

Index

Functions

function parse

parse: {
(
str: string,
options?: IParseOptions & { decoder?: never | undefined }
): ParsedQs;
(str: string | Record<string, string>, options?: IParseOptions): {
[key: string]: unknown;
};
};

    function stringify

    stringify: (obj: any, options?: IStringifyOptions) => string;

      Interfaces

      interface IParseOptions

      interface IParseOptions {}

        property allowDots

        allowDots?: boolean | undefined;

          property allowPrototypes

          allowPrototypes?: boolean | undefined;

            property allowSparse

            allowSparse?: boolean | undefined;

              property arrayLimit

              arrayLimit?: number | undefined;

                property charset

                charset?: 'utf-8' | 'iso-8859-1' | undefined;

                  property charsetSentinel

                  charsetSentinel?: boolean | undefined;

                    property comma

                    comma?: boolean | undefined;

                      property decoder

                      decoder?:
                      | ((
                      str: string,
                      defaultDecoder: defaultDecoder,
                      charset: string,
                      type: 'key' | 'value'
                      ) => any)
                      | undefined;

                        property delimiter

                        delimiter?: string | RegExp | undefined;

                          property depth

                          depth?: number | false | undefined;

                            property ignoreQueryPrefix

                            ignoreQueryPrefix?: boolean | undefined;

                              property interpretNumericEntities

                              interpretNumericEntities?: boolean | undefined;

                                property parameterLimit

                                parameterLimit?: number | undefined;

                                  property parseArrays

                                  parseArrays?: boolean | undefined;

                                    property plainObjects

                                    plainObjects?: boolean | undefined;

                                      property strictNullHandling

                                      strictNullHandling?: boolean | undefined;

                                        interface IStringifyOptions

                                        interface IStringifyOptions {}

                                          property addQueryPrefix

                                          addQueryPrefix?: boolean | undefined;

                                            property allowDots

                                            allowDots?: boolean | undefined;

                                              property arrayFormat

                                              arrayFormat?: 'indices' | 'brackets' | 'repeat' | 'comma' | undefined;

                                                property charset

                                                charset?: 'utf-8' | 'iso-8859-1' | undefined;

                                                  property charsetSentinel

                                                  charsetSentinel?: boolean | undefined;

                                                    property delimiter

                                                    delimiter?: string | undefined;

                                                      property encode

                                                      encode?: boolean | undefined;

                                                        property encoder

                                                        encoder?:
                                                        | ((
                                                        str: any,
                                                        defaultEncoder: defaultEncoder,
                                                        charset: string,
                                                        type: 'key' | 'value'
                                                        ) => string)
                                                        | undefined;

                                                          property encodeValuesOnly

                                                          encodeValuesOnly?: boolean | undefined;

                                                            property filter

                                                            filter?:
                                                            | Array<string | number>
                                                            | ((prefix: string, value: any) => any)
                                                            | undefined;

                                                              property format

                                                              format?: 'RFC1738' | 'RFC3986' | undefined;

                                                                property indices

                                                                indices?: boolean | undefined;

                                                                  property serializeDate

                                                                  serializeDate?: ((d: Date) => string) | undefined;

                                                                    property skipNulls

                                                                    skipNulls?: boolean | undefined;

                                                                      property sort

                                                                      sort?: ((a: string, b: string) => number) | undefined;

                                                                        property strictNullHandling

                                                                        strictNullHandling?: boolean | undefined;

                                                                          interface ParsedQs

                                                                          interface ParsedQs {}

                                                                            index signature

                                                                            [key: string]: undefined | string | string[] | ParsedQs | ParsedQs[];

                                                                              Type Aliases

                                                                              type defaultDecoder

                                                                              type defaultDecoder = (str: string, decoder?: any, charset?: string) => string;

                                                                                type defaultEncoder

                                                                                type defaultEncoder = (str: any, defaultEncoder?: any, charset?: string) => string;

                                                                                  Package Files (1)

                                                                                  Dependencies (0)

                                                                                  No dependencies.

                                                                                  Dev Dependencies (0)

                                                                                  No dev dependencies.

                                                                                  Peer Dependencies (0)

                                                                                  No peer dependencies.

                                                                                  Badge

                                                                                  To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                  You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/qs.

                                                                                  • Markdown
                                                                                    [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/qs)
                                                                                  • HTML
                                                                                    <a href="https://www.jsdocs.io/package/@types/qs"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>