Socket
Socket
Sign inDemoInstall

stdout-stderr

Package Overview
Dependencies
4
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    stdout-stderr

mock stdout and stderr


Version published
Weekly downloads
200K
decreased by-1.59%
Maintainers
1
Install size
67.7 kB
Created
Weekly downloads
 

Readme

Source

stdout-stderr

mock stdout and stderr

Version Known Vulnerabilities Downloads/week License

Usage:

const {stdout, stderr} = require('stdout-stderr')

stdout.start()                                // start mocking stdout
console.log('writing to stdout')              // this will not be displayed
stdout.stop()                                 // stop mocking stdout
assert(stdout.output === 'writing to stdout') // view the output


/* options */
stdout.stripColor = false // disable automatic ansi code stripping
stdout.print = true       // also output to screen

This uses the debug module so you can also see the output by setting DEBUG=stdout|stderr|*.

Keywords

FAQs

Last updated on 09 Feb 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc