npm.io
1.0.0 • Published 6 years ago

pull-through-end

Licence
MIT
Version
1.0.0
Deps
0
Size
1 kB
Vulns
0
Weekly
0

pull-through-end

like pull.onEnd but as a trhough stream. Calls an async function when the stream is ending.

const onEnd = require('pull-through-end')

pull(
  source,
  onEnd( (err, cb) =>{
    // err is either null or an Error object
    if (err) console.error(err)
    cb() // arguments to cb are ignored
  }),
  sink
)

License: MIT