AniLink - v3.0.0
    Preparing search index...

    Function formatMalFields

    • Formats a MalRequestOptions fields selector for the fields query parameter: an array becomes the comma-separated string MyAnimeList expects, a string passes through unchanged, and undefined stays undefined so buildQueryString omits the parameter entirely.

      Every MAL read and list-status write uses this helper to format the field selector the same way.

      Parameters

      • fields: string | readonly string[] | undefined

        The field selector from the request options, when one was given.

      Returns string | undefined

      The comma-separated selector string, or undefined when no selector was given.