@mntm/multipart
v2.0.2
Published
Probably the fastest most compatible lexer/parser/stringifier for multipart/form-data.
Downloads
1
Maintainers
Readme
@mntm/multipart
Probably the fastest most compatible lexer/parser/stringifier for multipart/form-data.
Usage
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({});
Installation
We recommend to use yarn for dependency management:
yarn add @mntm/multipart
License
@mntm/multipart is MIT licensed.