Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function log (name) {
return pull.through(function (data) {
console.log(name, data)
})
}
function passthrough (_onEnd) {
const onEnd = (err) => {
try {
_onEnd(err)
} catch (err2) {
if (err2) {
console.error('error in onEnd handler:', err2)
}
}
}
return pull.through(
null,
onEnd)
}
function passthrough (_onEnd) {
const onEnd = (err) => {
try {
_onEnd(err)
} catch (err2) {
if (err2) {
console.error('error in onEnd handler:', err2)
}
}
}
return pull.through(
null,
onEnd)
}