xstdout
capture stdout
Usage
Example:
const xstdout = ; const intercept = xstdout; console; intercept; to;
APIs
xstdout.intercept(silent, [silentErr])
Returns an object:
restore stdout stderr
stdout
/stderr
are arrays of strings that captured stdout/stderrrestore
is a function that restores the original stdout/stderr
Params
silent
- iftrue
, then omit actual output to console and only capturesilentErr
- if notundefined
, then independently controls output of stderr to console