One of the kind of cool things about zen-observable is you can
new Observable(observer => {
checkSomethingSynchronously()
return someOtherObservable.subscribe(observer)
})
I'm looking for an elegant way to do this with repeater. Seems like right now I'd have to use for..await:
new Repeater(async (push, stop) => {
await checkSomethingAsynchronously()
for await (const x of someOtherRepeater) push(x)
})
The syntax isn't bad really, but didn't we come to the conclusion awhile back that using for..await like this is dangerous? I can never remember the caveats exactly.
One of the kind of cool things about
zen-observableis you canI'm looking for an elegant way to do this with repeater. Seems like right now I'd have to use
for..await:The syntax isn't bad really, but didn't we come to the conclusion awhile back that using
for..awaitlike this is dangerous? I can never remember the caveats exactly.