AniLink - v3.1.0
    Preparing search index...

    Function buildQueryString

    • Builds a URL query string from a flat record of primitive values.

      The function skips undefined and null values, repeats keys for array values (the convention MyAnimeList uses for list parameters), and percent-encodes each value. An empty record produces an empty string. A plain object value throws a TypeError instead of serializing as [object Object]. Flatten nested parameters into primitive keys before calling this function.

      Parameters

      • params: Record<string, unknown>

        The query parameters, with flat primitive or array values.

      Returns string

      A query string beginning with ?, or an empty string.

      A TypeError when a value is a plain object. Flatten nested parameters into primitive keys before calling this function.