Skip to content

Latest commit

 

History

History
41 lines (25 loc) · 878 Bytes

README.md

File metadata and controls

41 lines (25 loc) · 878 Bytes

@mntm/multipart GitHub license

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.