setup-zig/node_modules/mimic-response/readme.md
Renée Kooi e834313fcd
Download tarball from zig download index (#2)
* Download tarball from zig download index

* try this

* Remove promisify

* Revert "try this"

This reverts commit e6ecfb58ed2819755bc79af1349e4fd0db59e3b5.
2019-10-07 10:17:11 +02:00

1.0 KiB

mimic-response Build Status

Mimic a Node.js HTTP response stream

Install

$ npm install mimic-response

Usage

const stream = require('stream');
const mimicResponse = require('mimic-response');

const responseStream = getHttpResponseStream();
const myStream = new stream.PassThrough();

mimicResponse(responseStream, myStream);

console.log(myStream.statusCode);
//=> 200

API

mimicResponse(from, to)

from

Type: Stream

Node.js HTTP response stream.

to

Type: Stream

Any stream.

License

MIT © Sindre Sorhus