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.1 to 1.0.2

.travis.yml

10

index.js

@@ -5,2 +5,7 @@ "use strict";

// the methods we can patch
var methods = [
'log', 'info', 'error', 'warn', 'dir', 'time', 'timeEnd', 'trace', 'assert'
];
/*

@@ -11,6 +16,3 @@ * patch all the console stuff documented at https://nodejs.org/api/console.html

if (newcons) {
[
'log', 'info', 'error', 'warn', 'dir', 'time', 'timeEnd', 'trace',
'assert'
].forEach(function (n) {
methods.forEach(function (n) {
if (newcons[n] instanceof Function)

@@ -17,0 +19,0 @@ console[n] = newcons[n];

4

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

@@ -19,4 +19,4 @@ "main": "index.js",

"devDependencies": {
"mocha": "~2.3.3"
"mocha": "~3.4.2"
}
}

@@ -0,1 +1,3 @@

[![Build Status](https://travis-ci.org/NetOxygen/console-monkey-patch.svg?branch=master)](https://travis-ci.org/NetOxygen/console-monkey-patch)
# console-monkey-patch

@@ -9,2 +11,5 @@ Hack the console object methods (like log, error, info etc.).

## Installation
npm install console-monkey-patch
## Simple example

@@ -11,0 +16,0 @@ The most simple example is to create a new `console.Console` object (see

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