How to use the @most/disposable.disposeWith function in @most/disposable

To help you get started, we’ve selected a few @most/disposable examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mostjs / core / packages / virtual-stream / src / toStream.js View on Github external
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)
}

@most/disposable

Reactive programming with lean, functions-only, curried, tree-shakeable API

MIT
Latest version published 4 years ago

Package Health Score

59 / 100
Full package analysis