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 asyncIteratorSymbol helper to check for async Iterator (#176)

authored by

Lalitha-Iyer and committed by
GitHub
0051a2fc a7c2c222

+1 -1
+1 -1
src/sources.ts
··· 118 118 * for the JS Iterable protocol. 119 119 */ 120 120 export function fromIterable<T>(iterable: Iterable<T> | AsyncIterable<T>): Source<T> { 121 - if (iterable[Symbol.asyncIterator]) return fromAsyncIterable(iterable as AsyncIterable<T>); 121 + if (iterable[asyncIteratorSymbol()]) return fromAsyncIterable(iterable as AsyncIterable<T>); 122 122 return sink => { 123 123 const iterator = iterable[Symbol.iterator](); 124 124 let ended = false;