0.1.4 • Published 2 years ago

fdex v0.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

npm version types size coverage vulnerabilities dependencies License

small form-data extractor

Installation

$ npm i fdex

Usage

import fdex, {getBoundary} from 'fdex';
import express from 'express';

const app = express();

app.post('/', (req) => {
    const contentType = req.headers['content-type'];
    const boundary = getBoundary(contentType);

    const extractor = fdex(boundary);
    req.pipe(extractor)
        .on('data', ([headers, body]) => {
            console.info(headers, body);
        })
    ;
});

app.listen(3000);

About

Jet another multipart/form-data extractor/processor. This projects aim was to understand and process the multipart/form-data format without any additional dependencies.

Licence

MIT License, see LICENSE

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago