repeatEachAsync
repeatEachAsync<
T>(iterable,times):AsyncIterableIterator<T>
Defined in: packages/core/src/iterable/async/repeat-each.ts:17
Yields each element times times in a row before moving to the next.
The async counterpart of repeatEach. Not cycleAsync, which repeats the
whole sequence rather than each element.
Time complexity: O(n × times). Nothing is buffered.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”iterable
Section titled “iterable”The input iterable, sync or async.
number
How many times to repeat each element. Must be a non-negative integer.
Returns
Section titled “Returns”AsyncIterableIterator<T>
An iterator over the repeated elements.
Throws
Section titled “Throws”If times is not a non-negative integer.