UNPKG

gatsby-drupal-webform

Version:
15 lines (14 loc) 474 B
/** * @file Utils * @see: https://lengstorf.com/code/get-form-values-as-json/ */ declare type FormJSON = { [name: string]: string | string[]; }; /** * Retrieves input data from a form and returns it as a JSON object. * @param {HTMLFormControlsCollection} elements the form elements * @return {Object} form data as an object literal */ export declare const formToJSON: (elements: HTMLFormControlsCollection) => FormJSON; export {};