Files
Investidor-V2/outputs/investmoz-parques-mapa-20261016/matrix-tool/node_modules/pause-stream
nala cef6e201c7
tests / ci (push) Canceled after 0s
versao nrgocios 2
2026-10-16 20:11:05 +02:00
..
2026-10-16 20:11:05 +02:00
2026-10-16 20:11:05 +02:00
2026-10-16 20:11:05 +02:00
2026-10-16 20:11:05 +02:00
2026-10-16 20:11:05 +02:00
2026-10-16 20:11:05 +02:00

PauseStream

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

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

  badlyBehavedStream.pipe(ps.pause())

  aLittleLater(function (err, data) {
    ps.pipe(createAnotherStream(data))
    ps.resume()
  })

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

https://github.com/dominictarr/pause-stream/commit/4a6fe3dc2c11091b1efbfde912e0473719ed9cc0