output-interceptor
Intercepts stdout/ stderr.
Implementation
This module uses domain
to capture asynchronous function output.
Read Capturing stdout/ stderr in Node.js using Domain module.
Usage
; const interceptOutput = ; const main = async { const result = await ; result === 'baz'; interceptOutputoutput === 'foo\nbar\n';}; ;
API
/** * @property interceptStderr Default: true. * @property interceptStdout Default: true. * @property stripAnsi Default: true. */; /** * @returns Intercepted output. */type string; /** * @property output Output produced during the executing of the `routine`. */; : OutputInterceptorType;