fromIter()
Emit every value from a synchronous iterable.
Import
Section titled “Import”import { fromIter } from "@graphrefly/ts/sources";Signature
Section titled “Signature”function fromIter(iterable: Iterable<T>): Operator<never, T>Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
iterable | Iterable<T> | Iterable whose values are emitted in order. |
Returns
Section titled “Returns”A source operator that emits every iterable value and then COMPLETE.
Example
Section titled “Example”import { graph } from "@graphrefly/ts/graph";import { fromIter } from "@graphrefly/ts/sources";
const values = graph().initNode(fromIter([1, 2, 3]), []);Source
Section titled “Source”packages/ts/src/graph/sources.ts