a ThroughStream that strictly buffers all readable events when paused.

npm install pause-stream
3 597 downloads in the last day
18 486 downloads in the last week
82 881 downloads in the last month


This is a Stream that will strictly buffer when paused. Connect it to anything you need buffered.

  var ps = require('pause-stream')();


  aLittleLater(function (err, data) {

PauseStream will buffer whenever paused. it will buffer when yau have called pause manually. but also when it's downstream dest.write()===false. it will attempt to drain the buffer when you call resume or the downstream emits 'drain'

PauseStream is tested using stream-spec and stream-tester

This is now the default case of through

npm loves you