tsoa
This commit is contained in:
29
node_modules/@hapi/wreck/lib/tap.js
generated
vendored
Executable file
29
node_modules/@hapi/wreck/lib/tap.js
generated
vendored
Executable file
@@ -0,0 +1,29 @@
|
||||
'use strict';
|
||||
|
||||
const Stream = require('stream');
|
||||
|
||||
const Payload = require('./payload');
|
||||
|
||||
|
||||
const internals = {};
|
||||
|
||||
|
||||
module.exports = internals.Tap = class extends Stream.Transform {
|
||||
|
||||
constructor() {
|
||||
|
||||
super();
|
||||
this.buffers = [];
|
||||
}
|
||||
|
||||
_transform(chunk, encoding, next) {
|
||||
|
||||
this.buffers.push(chunk);
|
||||
next(null, chunk);
|
||||
}
|
||||
|
||||
collect() {
|
||||
|
||||
return new Payload(this.buffers);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user