MCPcopy Create free account
hub / github.com/tensorflow/tfjs / serialForEach

Function serialForEach

tfjs-data/src/iterators/lazy_iterator.ts:329–331  ·  view source on GitHub ↗

* Apply a function to every element of the stream, forcing serial execution. * * @param f A function to apply to each stream element. Should return 'true' * to indicate that the stream should continue, or 'false' to cause it to * terminate.

(f: (value: T) => Promise<boolean>)

Source from the content-addressed store, hash-verified

327 * terminate.
328 */
329 async serialForEach(f: (value: T) => Promise<boolean>): Promise<void> {
330 return this.serialMapAsync(f).resolveWhile(x => (x === true));
331 }
332
333 /**
334 * Groups elements into batches, represented as arrays of elements.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…