How to use @most/scheduler - 10 common examples

To help you get started, we’ve selected a few @most/scheduler 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 / withLocalTime.js View on Github external
run (sink, scheduler) {
    return this.source.run(relativeSink(this.origin, sink), schedulerRelativeTo(this.origin, scheduler))
  }
}
github mostjs / core / packages / core / src / combinator / mergeConcurrently.ts View on Github external
const mapAndRun = (f: (a: A) =&gt; Stream<b>, t: Time, x: A, sink: Sink<b>, scheduler: Scheduler): Disposable =&gt;
  f(x).run(sink, schedulerRelativeTo(t, scheduler))
</b></b>
github mostjs / core / packages / core / src / combinator / withLocalTime.ts View on Github external
run (sink: Sink<a>, scheduler: Scheduler): Disposable {
    return this.source.run(relativeSink(this.origin, sink), schedulerRelativeTo(this.origin, scheduler))
  }
}</a>
github mostjs / core / packages / core / src / combinator / switch.ts View on Github external
constructor(source: Stream<a>, min: Time, max: Time, outer: SwitchSink</a><a>, sink: Sink</a><a>, scheduler: Scheduler) {
    this.min = min
    this.max = max
    this.outer = outer
    this.sink = sink
    this.disposable = source.run(this, schedulerRelativeTo(min, scheduler))
  }
</a>
github mostjs / core / packages / core / src / combinator / switch.ts View on Github external
dispose(): void {
    return this.disposeCurrent(currentTime(this.scheduler))
  }
github mostjs / core / packages / core / src / combinator / promises.ts View on Github external
  private endBound = (): void => this.sink.end(currentTime(this.scheduler))
  private errorBound = (e: Error): void => this.sink.error(currentTime(this.scheduler), e)
github mostjs / core / packages / core / src / combinator / promises.ts View on Github external
  private errorBound = (e: Error): void => this.sink.error(currentTime(this.scheduler), e)
}
github mostjs / core / packages / core / src / combinator / promises.ts View on Github external
  private eventBound = (x: A): void => this.sink.event(currentTime(this.scheduler), x)
  private endBound = (): void => this.sink.end(currentTime(this.scheduler))
github mostjs / core / packages / core / src / combinator / delay.ts View on Github external
event(_t: Time, x: A): void {
    this.tasks.push(scheduleDelay(this.dt, propagateEventTask(x, this.sink), this.scheduler))
  }
github mostjs / core / packages / core / src / combinator / limit.ts View on Github external
event(_t: Time, x: A): void {
    this.clearTimer()
    this.value = x
    this.timer = delay(this.dt, new DebounceTask(this, x), this.scheduler)
  }

@most/scheduler

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

MIT
Latest version published 4 years ago

Package Health Score

54 / 100
Full package analysis