formism
v1.0.3
Published
formdata parse and convert
Downloads
3
Readme
Formism
easy way to pack and unpack your data
install
yarn add formism
pack your data to FormData
import { pack } from 'formism';
const sourceObj = [{
deep: {
file: new File([], 'empty.txt'),
string: 'string',
number: 123,
boolean: false,
},
}];
const formData = pack(sourceObj); // output a FormData instance
unpack FormData
import { unpack } from 'formism';
const recoveredObj = unpack(formData);