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

    Function skip

    • Creates a task discarding a prefix of the feed.

      The leading items are pulled from the source and dropped, then the rest of the feed is emitted lazily, in source order; a shorter feed is consumed entirely and nothing is emitted.

      Type Parameters

      • V

        The type of items in the feed

      Parameters

      • n: number

        The number of leading items to discard; values less than 1 leave the feed untouched

      Returns Task<V>

      A task yielding the items following the first n

      If n is not an integer

      await pipe(
      (items(1, 2, 3, 4, 5))
      (skip(2))
      (toArray())
      ); // [3, 4, 5]