UNPKG

@klodianimeri/pipejs

Version:

Pipe functions that provide convenient and efficient ways to work with iterators.

5 lines 224 B
export const assertAsync = (value?: AsyncIterable<any, any, unknown>) => { if (!value || typeof value[Symbol.asyncIterator] !== 'function') { throw new Error(`Value not an async iterator: ${value}`); } };