We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
function createMyStream (emitter) { var pushable = Pushable((err) => console.log('error', err)) emitter.on('data', pushable.push.bind(pushable)) emitter.on('end', pushable.end.bind(pushable)) emitter.on('error', ???) return pushable }
thanks
The text was updated successfully, but these errors were encountered:
pushable.end takes an argument, https://github.com/pull-stream/pull-pushable/blob/master/index.js#L28 that can be the error,
pushable.end
but really, it looks like you should use stream-to-pull-stream instead of pull-pushable
return toPull.source(emitter)
Sorry, something went wrong.
Ah ha. So pushable.end() can be the end event, and pushable.end(error) can be the error event. Thanks
pushable.end()
pushable.end(error)
function createMyStream (emitter) { var pushable = Pushable(function onEnd (err) { if (err) console.log(err) emitter.removeAllListeners() }) emitter.on('data', (data) => pushable.push(data)) emitter.on('end', () => pushable.end()) emitter.on('error', (err) => pushable.end(err)) return pushable }
No branches or pull requests
thanks
The text was updated successfully, but these errors were encountered: