You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

console-monkey-patch

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

console-monkey-patch - npm Package Compare versions

Comparing version

to
1.0.1

2

package.json
{
"name": "console-monkey-patch",
"version": "1.0.0",
"version": "1.0.1",
"description": "Node.js module monkeypatching the console object",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -12,12 +12,12 @@ # console-monkey-patch

https://nodejs.org/api/console.html#console_class_console):
```lang=js
```javascript
var fs = require("fs");
var newstdout = fs.createWriteStream('/some/path', {flags: 'a'});
var newstderr = fs.createWriteStream('/some/other/path', {flags: 'a'});
var newcons = new console.Console(newstdout, newstdout);
var newstdout = fs.createWriteStream('/tmp/stdout.log', {flags: 'a'});
var newstderr = fs.createWriteStream('/tmp/stderr.log', {flags: 'a'});
var newcons = new console.Console(newstdout, newstderr);
require("console-monkey-patch")(newcons);
console.log('this should go to /some/path');
console.error('this should go to /some/other/path');
console.log('this should go to /tmp/stdout.log');
console.error('this should go to /tmp/stderr.log');
```

@@ -24,0 +24,0 @@