Son CV dans un terminal web en Javascript! https://terminal-cv.gregandev.fr
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
711 B

2 years ago
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
function _stream() {
const data = require("stream");
_stream = function () {
return data;
};
return data;
}
/*
* "Taps" into the contents of a flowing stream, yielding chunks to the passed
* callback. Continues to pass data chunks down the stream.
*/
class TapStream extends _stream().Transform {
constructor(tap, options) {
super({ ...options
});
this._tap = tap;
}
_transform(chunk, encoding, callback) {
try {
this._tap(Buffer.from(chunk));
callback(null, chunk);
} catch (err) {
callback(err);
}
}
}
exports.default = TapStream;