This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 400,000 packages pre-installed, including
apr-times with all
npm packages installed. Try it out:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
n times, and accumulates results in the same manner you would use with map.
import times from 'apr-times'; const then = (v) => new Promise((resolve) => resolve(v)); const res = await times(6, async (i) => await then(i); ); // res = [0, 1, 2, 3, 4, 5]