@appsemble/node-utils
Version:
NodeJS utilities used by Appsemble internally.
11 lines (10 loc) • 504 B
TypeScript
import FormData from 'form-data';
/**
* A convenience function for creating form data.
*
* @param data A key / value record of fields to append to the form data. Booleans, numbers,
* strings, and `null` will be added to the form data raw. Objects will be transformed to JSON
* objects. Arrays will be iterated over and every item will be appended for the given key.
* @returns The data represented as form data.
*/
export declare function createFormData(data: Record<string, any>): FormData;