0no-co / wonka

🎩 A tiny but capable push & pull stream library for TypeScript and Flow
MIT License
709 stars 29 forks source link

Fix skipUntil pulling and add early closing #54

Closed kitten closed 4 years ago

kitten commented 4 years ago

This is similar to #51 in that skipUntil wasn't pulling at consistent times. It's a little different, since the notifier in skipUntil must always be pulled first, before the source, since otherwise the notifier doesn't have a chance to emit a value and let source values flow through before source emits its own value.

Additionally the skipUntil operator now closes the source when it can never emit a value anymore, i.e. when the notifier ends without emitting any values.