Const
Promise.any implementation
just ref the MDN document
Promise.any()
takes an iterable of Promise objects and, as soon as one of the promises in the iterable fulfils, returns a single promise that resolves with the value from that promise. If no promises in the iterable fulfil (if all of the given promises are rejected), then throw the array of errors
concurrency simply debounce function
it will create a debounced function that delays invoking func until after wait milliseconds have elapsed since the last time the debounced function was invoked
wait milliseconds before last time invocation
limit concurrent for parallel operations
async operation function
max concurrency number
the concurrency limited function wrapper
reuse values in specific duration for async functions
must be an async function
default 1000 milliseconds
different cache values for parameters
run async operations one by one, serially
and return the result array
if any operation raise error, the following operations will not be executed
Rest
...asyncOperations: Tasync operations
let async function only invoke at once in same time
the function to be processed
the wrapped function instance
wrap an async function with timeout
async runner please, otherwise the timeout
is not meaningful
timeout threshold in milliseconds, default value is 60 seconds
concurrency functions