pull-eager-buffer

1.0.3 • Public • Published

Build Status

Buffer that reads (enqueue) as much data as possible before draining (dequeuing). It still allows draining of buffered data when reads are delayed.

Useful for simulating the behaviour of unsynchronized transport channels, such as WebSockets when used in pull-ws.

Quick Example

 var buffer = require('pull-eager-buffer')
 var pull = require('pull-stream')
 
 // Prints 0,1,2,0,1,2
 pull(
   pull.count(2),
   pull.through(console.log),
   buffer,
   pull.through(console.log),
   pull.drain()
 )

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    1
  • 1.0.2
    0
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i pull-eager-buffer

Weekly Downloads

1

Version

1.0.3

License

MIT

Last publish

Collaborators

  • elavoie