How to use the @most/disposable.disposeOnce 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 / core / src / combinator / continueWith.ts View on Github external
constructor(f: () =&gt; Stream<a>, source: Stream</a><a>, sink: Sink</a><a>, scheduler: Scheduler) {
    super(sink)
    this.f = f
    this.scheduler = scheduler
    this.active = true
    this.disposable = disposeOnce(source.run(this, scheduler))
  }
</a>
github mostjs / core / packages / core / src / combinator / multicast.ts View on Github external
run(sink: Sink<a>, scheduler: Scheduler): Disposable {
    const n = this.add(sink)
    if (n === 1) {
      this.disposable = this.source.run(this, scheduler)
    }
    return disposeOnce(new MulticastDisposable(this, sink))
  }
</a>
github mostjs / core / packages / core / src / combinator / mergeConcurrently.ts View on Github external
constructor(f: (a: A) =&gt; Stream<b>, concurrency: number, source: Stream<a>, sink: Sink<b>, scheduler: Scheduler) {
    this.f = f
    this.concurrency = concurrency
    this.sink = sink
    this.scheduler = scheduler
    this.pending = []
    this.current = []
    this.disposable = disposeOnce(source.run(this, scheduler))
    this.active = true
  }
</b></a></b>

@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