UNPKG

@klodianimeri/pipejs

Version:

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

5 lines 211 B
export const assertSync = (value?: Iterable<any, any, unknown>) => { if (!value || typeof value[Symbol.iterator] !== 'function') { throw new Error(`Value not a sync iterator: ${value}`); } };