Documentation
    Preparing search index...

    Function fromTimeline

    • Creates a ReadableStream from a "timeline".

      Type Parameters

      • T extends unknown

      Parameters

      • timelineString: string
      • OptionalqueuingStrategy: QueuingStrategy<T>

      Returns ReadableStream<T>

      fromTimeline('--1--2--3--4--')
      .pipeTo(write(console.info))
      // 1
      // 2
      // 3
      // 4

      Each dash is considered a timeout of 1ms.

      merge([
      fromTimeline('--1---2---3---4--'),
      fromTimeline('----a---b---c----'),
      ])
      .pipeTo(write(console.info))
      // 1
      // a
      // 2
      // b
      // 3
      // c
      // 4