Module

x/live/clients/formdata.ts>formDataToProps

Git-based Visual CMS for Deno, </> htmx and Tailwind apps. Deploy on any Deno-compatible host.
Latest
function formDataToProps
import { formDataToProps } from "https://dotland.deno.dev/x/live@1.107.0/clients/formdata.ts";

Convert a FormData instance to a javascript object.

Usage:

const formData = new FormData();
formData.append("foo", "bar");
const props = formDataToProps(formData);
console.log(props); // { foo: "bar" }

Parameters

formData: FormData

FormData instance to convert.

Returns

Record<string, any>

javascript object with the given FormData.