UNPKG

rc-js-util

Version:

A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.

11 lines 333 B
/** * @public * Iterate over an iterator until it's done, discarding the results. */ export function iteratorConsumeAll(iterator) { // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions while (!iterator.next().done) { // no action needed } } //# sourceMappingURL=iterator-consume-all.js.map