Async function that returns the chain as an array of values
constvalues = awaitasArray(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 constvalues = awaitasArray(chain, { limit:5 }); // Stop after 5 seconds has elapsed constvalues = awaitasArray(chain, { elapsed:5000 });
Async function that returns the chain as an array of values
If the chain is infinite, be sure to specify limits: