1.0.1 • Published 3 months ago

parser-multipart v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

parser-multipart

Multipart form data parser for browser and node

Example 1: Text parse

import { Parser } from "parser-multipart";

const res = await fetch(/* your url */);
const parser = new Parser(res.headers);
return parser.parse(await res.text()).responses.map((res) => res.json());

Example 2: Line-by-line

import { Parser } from "parser-multipart";
import newlineIterator from "newline-iterator";

const res = await fetch(/* your url */);
const parser = new Parser(res.headers);
for (const line of newlineIterator(await res.text())) parser.push(line);
return parser.responses.map((res) => res.json());

Documentation

API Docs

1.0.1

3 months ago

1.0.0

3 months ago

0.1.10

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.9

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago