ixfx
    Preparing search index...

    Function asArray

    • Async function that returns the chain as an array of values

      const values = await asArray(tick( { interval: 1000, loops: 5 }));
      // After 5 seconds, values will be a set of timestamps.

      If the chain is infinite, be sure to specify limits:

      // Stop after we have five items
      const values = await asArray(chain, { limit: 5 });
      // Stop after 5 seconds has elapsed
      const values = await asArray(chain, { elapsed: 5000 });

      Type Parameters

      • Out

      Parameters

      Returns Promise<Out[]>