1 | ;
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.default = void 0;
|
7 | // https://gist.github.com/pguillory/729616
|
8 |
|
9 | function hookStdout(callback) {
|
10 | let old_write = process.stdout.write;
|
11 |
|
12 | // @ts-ignore
|
13 | process.stdout.write = (write => function (str) {
|
14 | write.apply(process.stdout, arguments);
|
15 | callback(str);
|
16 | })(process.stdout.write);
|
17 | return () => {
|
18 | process.stdout.write = old_write;
|
19 | };
|
20 | }
|
21 | var _default = hookStdout;
|
22 | exports.default = _default;
|
23 |
|
24 | //# sourceMappingURL=hookStdout.ts.map |
\ | No newline at end of file |