Socket
Socket
Sign inDemoInstall

intercept-stdout

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

intercept-stdout

Hooking Node.js stdout


Version published
Weekly downloads
22K
decreased by-16.63%
Maintainers
1
Weekly downloads
 
Created
Source

Node.js Intercept stdout

intercept-stdout captures stdout

Based on this gist.

Usage

var intercept = require("intercept-stdout"),
	captured_text = "";

var unhook_intercept = intercept(function(txt) {
	captured_text += txt;
});

console.log("This text is being captured");

// Let's stop capturing stdout.
unhook_intercept();

console.log("This text is not being captured");

Test

npm install
npm test

Keywords

FAQs

Package last updated on 17 Feb 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc