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

    Interface Task<V, R>

    Intermediate operation applied to a feed.

    A task consumes the items of a Feed and reports a new feed carrying new ones, transforming, filtering, reordering or regrouping items along the way; the reported feed accepts further tasks, so tasks chain into longer pipes.

    The task draws from a feed, so it may either iterate it with for await or compose it with further tasks and sinks, delegating the whole transformation or part of it to operations already available.

    Caution

    The feed handed over and the feed reported must both be assumed to be drained by a single pass.

    Type Parameters

    • V

      The type of items drawn from the feed

    • R = V

      The type of items reported, defaulting to V for tasks preserving the item type

    • Transforms the items.

      Parameters

      • feed: Feed<V>

        The feed carrying the items to process

      Returns Feed<R>

      A feed carrying the transformed items