intersperseAsync
intersperseAsync<
T,S>(iterable,separator):AsyncIterableIterator<T|S>
Defined in: packages/core/src/iterable/async/intersperse.ts:15
Yields separator between consecutive elements, with none before the first
or after the last.
The async counterpart of intersperse.
Time complexity: O(1) per element.
Type Parameters
Section titled “Type Parameters”T
S
Parameters
Section titled “Parameters”iterable
Section titled “iterable”The input iterable, sync or async.
separator
Section titled “separator”S
The value to place between elements.
Returns
Section titled “Returns”AsyncIterableIterator<T | S>
An iterator over the elements, separated.