pull-through

through ported to pull-stream style

pull-through

through ported to pull-stream style.

Same Good Old Api, Brand New Underlying Mechanism.

var through = require('pull-through')
 
var ts = through(function (data) {
  this.queue(data)
}, function (end) {
  this.queue(null)
})

use var self = this, don't keep a reference.

var WRONG = through(function (data) { WRONG.queue(data) })
through(function (data) { this.queue(data) })

Maybe this will change. this is a little more tricky with pull-streams, though.

MIT