kit
    Preparing search index...

    Function decodeForm

    • Decode form data

      This function is meant to be used inside an api endpoint to gather an encoded form submit data and transform it to the decoded desired json data.

      Here too we skip encoding/decoding process for names prefixed wth an underscore which are considered programmatic form data not created by user input.

      Type Parameters

      • ReturnAs extends Record<string, unknown> = Record<string, unknown>
      • FormData extends Record<string, unknown> = Record<string, unknown>

      Parameters

      Returns ReturnAs