Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

debug-stream

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

debug-stream

use the debug module on a stream

  • 3.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

debug-stream

Use the debug module on a stream

npm install debug-stream

Usage

var debugStream = require('debug-stream')('my-app')

process.stdin
  .pipe(debugStream())
  .resume() // just drain it

// or if you're already using debug

var debug = require('debug')('my-app')
var debugStream = require('debug-stream')(debug)

process.stdin
  .pipe(debugStream())
  .resume()

Running the above program with DEBUG=* will use the debug module on every buffer/object in the stream.

You can add an optional format string as well

var debugStream = require('debug-stream')('my-app')

process.stdin
  .pipe(debugStream('process.stdin: %s'))
  .resume() // just drain it

The debug stream behaives as pass through stream so can just insert it in any existing pipe chain

inputStream
  .pipe(debugStream())
  .pipe(outputStream)

Browser support

As with debug, this module also supports the browser environment through either browserify or webpack.

To enable the functionality, you need to run require('debug').enable('*') in your console. It will persist this setting in localStorage, until you run require('debug').disable().

License

MIT

Keywords

FAQs

Package last updated on 24 Jul 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