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

    Function pipe

    Creates a pipe.

    • Creates a pipe closed by a sink.

      Wraps a feed, the tasks chained to it and the Sink closing them into a single expression driving the feed to completion.

      Type Parameters

      • V

        The type of result the closing sink resolves to

      Parameters

      • source: Promise<V>

        The promise returned by the closing sink

      Returns Promise<V>

      A promise resolving to the result the closing sink computes over the feed

    • Creates a pipe left open.

      Wraps a feed and the tasks chained to it into a single expression, with no sink to close them, exposing the async iterable underlying the Feed the composition ends with so that the feed can be consumed manually.

      Type Parameters

      • V

        The type of values carried by the feed

      Parameters

      • source: Feed<V>

        The feed the composition ends with

      Returns AsyncIterable<V>

      The async iterable underlying source