Probably the fastest most compatible lexer/parser/stringifier for multipart/form-data.
If you don't need to parse headers and encoding, use lexer:
import { formLexer } from '@mntm/multipart';
const lexed = formLexer(buffer);
Otherwise use parser:
import { formParser } from '@mntm/multipart';
const parsed = formParser(buffer);
For stiringify data to multipart/form-data:
import { fromStringify, BOUNDARY } from '@mntm/multipart';
const body = fromStringify({});
We recommend to use yarn for dependency management:
yarn add @mntm/multipart
@mntm/multipart is MIT licensed.