Mirror: 🎩 A tiny but capable push & pull stream library for TypeScript and Flow
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Use a ponyfill observable instead of polyfilling (#121)

* Use a ponyfill observable instead of polyfilling

To match behaviour of other packages like RxJS (https://github.com/ReactiveX/rxjs/blob/6fa819beb91ba99dadd6262d6c13f7ddfd9470c5/src/internal/symbol/observable.ts) and redux (https://github.com/reduxjs/redux/blob/cf5043a4de63cb3a26dfb5e7e2d5a68d2d8a79f5/src/utils/symbol-observable.ts).

* Update src/observable.ts to skip Symbol support check

https://github.com/0no-co/wonka/pull/121#discussion_r1000068633

Co-authored-by: Phil Pluckthun <phil@kitten.sh>

* Fix prettier issue

Co-authored-by: Paul Gerarts <paulgerarts@weave.nl>
Co-authored-by: Phil Pluckthun <phil@kitten.sh>

authored by

Paul Gerarts
Phil Pluckthun
Paul Gerarts
and committed by
GitHub
20692519 34ee8d77

+1 -2
+1 -2
src/observable.ts
··· 16 16 subscribe(observer: ObservableObserver<T>): ObservableSubscription; 17 17 } 18 18 19 - const observableSymbol = (): symbol => 20 - (Symbol as any).observable || ((Symbol as any).observable = Symbol('observable')); 19 + const observableSymbol = (): symbol | string => Symbol.observable || '@@observable'; 21 20 22 21 export function fromObservable<T>(input: Observable<T>): Source<T> { 23 22 input = input[observableSymbol()] ? (input as any)[observableSymbol()]() : input;