3h-join
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

3h-join

A stream body parser.

Example

const join = require('3h-join');
 
function callback(err, data) {
    if (err) {
        console.error('Error while reading stream: ', err);
    } else {
        console.log(`Received: ${JSON.stringify(data)}`);
    }
}
 
join.text({ stream: textStream }, callback);
 
join.json({
    stream: jsonStream,
    // parser: myJSONParser
}, callback);
 
join.form({
    stream: formStream,
    // parser: myFormParser
}, callback);
 

APIs

See the declaration file to learn the APIs.

Package Sidebar

Install

npm i 3h-join

Weekly Downloads

6

Version

2.0.0

License

MIT

Unpacked Size

4.69 kB

Total Files

5

Last publish

Collaborators

  • 3h