Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function setup() {
stdout = '';
hijackStdout(function(data) {
stdout += data;
});
stderr = '';
hijackStderr(function(data) {
stderr += data;
});
c = new Console(process.stdout, process.stderr);
}
constructor(
bus: OutputService['bus'],
{ stdout = process.stdout, stderr = process.stderr }
) {
this.bus = bus
this.bus.on(LogEvent, this.log.bind(this))
this.console = new Console(stdout, stderr)
}
function jsonForSettingsUse(evt) {
if(evt.srcElement.id == "json"){
var nodeConsole = require('console');
var myConsole = new nodeConsole.Console(process.stdout, process.stderr);
myConsole.log('\x1b[34m%s\x1b[0m','THIS IS HOW TO READ A FILE IN JS');
myConsole.log('\x1b[34m%s\x1b[0m','RIGHT KNOW I AM IN jsExample.js');
ipc.send('openJsonFile');
}
}