Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const finish = (vstream, sink, scheduler, tasks) => {
if (vstream instanceof Finite) {
tasks.push(scheduler.delay(vstream.time, propagateEndTask(sink)))
} else if (vstream instanceof Errored) {
tasks.push(scheduler.delay(vstream.time, propagateErrorTask(vstream.error, sink)))
}
return disposeWith(cancelAll, tasks)
}