mntm-lib / multipart

Probably the fastest most compatible lexer/parser/stringifier for multipart/form-data

Home Page:https://npm.im/@mntm/multipart

Repository from Github https://github.commntm-lib/multipartRepository from Github https://github.commntm-lib/multipart

@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.

About

Probably the fastest most compatible lexer/parser/stringifier for multipart/form-data

https://npm.im/@mntm/multipart

License:MIT License


Languages

Language:TypeScript 100.0%