This repository has been archived on 2022-03-12. You can view files and clone it, but cannot push or open issues or pull requests.

25 lines
539 B
JavaScript
Raw Normal View History

2021-04-02 02:24:13 +03:00
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
// https://gist.github.com/pguillory/729616
function hookStdout(callback) {
let old_write = process.stdout.write; // @ts-ignore
process.stdout.write = (write => function (str) {
write.apply(process.stdout, arguments);
callback(str);
})(process.stdout.write);
return () => {
process.stdout.write = old_write;
};
}
var _default = hookStdout;
exports.default = _default;
//# sourceMappingURL=hookStdout.js.map