@metreeca/flow - v0.9.21
    Preparing search index...

    Interface Feed<V>

    Feed under composition.

    A feed is called to advance the pipe: with a Task to obtain a new feed carrying the transformed values, with a Sink to consume it and obtain the final result, or without arguments to take over iteration manually. Composition is lazy, as nothing is pulled from the source until a sink or a manual iteration consumes the feed.

    Type Parameters

    • V

      The type of values in the feed, never undefined, as optional values are dropped as data enters it

    • Applies a transformation task to the feed.

      Type Parameters

      • R

        The type of transformed values, never undefined, as optional values are dropped as they re-enter the feed

      Parameters

      • task: Task<V, R>

        The task to apply

      Returns Feed<R>

      A new feed carrying the values task yields

    • Applies a terminal sink operation to consume the feed.

      Type Parameters

      • R

        The type of result

      Parameters

      • sink: Sink<V, R>

        The sink to apply

      Returns Promise<R>

      A promise resolving to the sink's result

    • Retrieves the underlying async iterable.

      Returns AsyncIterable<V>

      The async iterable for manual iteration