Skip to content
PACKAGES

fromIter()

Emit every value from a synchronous iterable.

import { fromIter } from "@graphrefly/ts/sources";
function fromIter(iterable: Iterable<T>): Operator<never, T>
ParameterTypeDescription
iterableIterable<T>Iterable whose values are emitted in order.

A source operator that emits every iterable value and then COMPLETE.

import { graph } from "@graphrefly/ts/graph";
import { fromIter } from "@graphrefly/ts/sources";
const values = graph().initNode(fromIter([1, 2, 3]), []);

packages/ts/src/graph/sources.ts