BlueGit

blue-star danique-bot

Files

danique-bot / node_modules / debug / src / inspector-log.js

inspector-log.js

Import template
timfa Tim · pushed by timfa · 4 years ago
c788ad20 History
inspector-log.js 373 B Download Raw
1module.exports = inspectorLog;
2
3// black hole
4const nullStream = new (require('stream').Writable)();
5nullStream._write = () => {};
6
7/**
8 * Outputs a `console.log()` to the Node.js Inspector console *only*.
9 */
10function inspectorLog() {
11 const stdout = console._stdout;
12 console._stdout = nullStream;
13 console.log.apply(console, arguments);
14 console._stdout = stdout;
15}