JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q23504F
  • License MIT

Queue for pull-streams

Package Exports

  • pull-queue

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pull-queue) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

pull-queue

Pull stream with queue

API

queue(through) - Returns a duplex stream with built-in-queue

Example

queue(function(end, data, cb) {
  if (end) return cb(end)
  if (validateData(data)) cb(null, data) //will send that data
  else cb() //will not send anything
})

FAQ

Q: Why a duplex?

A: Because otherwise we would have to return null for some reads which causes trouble

Q: Why not pull-through?

A: See Q#1