Socket
Socket
Sign inDemoInstall

console-monkey-patch

Package Overview
Dependencies
0
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc