biofriction-wp-theme/node_modules/mimic-response
jorge-vitrubio a7910c81a8 moved to new repo 2021-10-26 14:18:09 +02:00
..
index.js moved to new repo 2021-10-26 14:18:09 +02:00
license moved to new repo 2021-10-26 14:18:09 +02:00
package.json moved to new repo 2021-10-26 14:18:09 +02:00
readme.md moved to new repo 2021-10-26 14:18:09 +02:00

readme.md

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