@metreeca/pipe - v0.9.11
    Preparing search index...

    Function items

    • Creates a pipe from a data source.

      Data sources are handled as follows:

      • undefined - filtered out and not yielded
      • Primitives (strings, numbers, booleans, null): Treated as atomic values and yielded as single items
      • Arrays/Iterables (excluding strings): Items are yielded individually (with undefined items filtered out)
      • Async Iterables/Pipes: Items are yielded as they become available (with undefined items filtered out)
      • Promises: Awaited and then processed according to their resolved value
      • Other values (objects, etc.): Yielded as single items

      The feed parameter can be synchronous or asynchronous (returning a Promise). Async feeds are useful for fetching data from APIs, databases, or any async source.

      Type Parameters

      • V

        The type of items in the stream

      Parameters

      • feed: Data<V> | Promise<Data<V>>

        The source to create a pipe from

      Returns Pipe<V>

      A pipe for fluent composition

    • Creates a pipe from multiple scalar values.

      Type Parameters

      • V

        The type of items in the stream

      Parameters

      • ...values: readonly [V, V, V]

        The scalar values to create a pipe from

      Returns Pipe<V>

      A pipe for fluent composition