rebuild hrm
This commit is contained in:
12
node_modules/es-toolkit/dist/array/flatMapAsync.mjs
generated
vendored
Normal file
12
node_modules/es-toolkit/dist/array/flatMapAsync.mjs
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import { flatten } from './flatten.mjs';
|
||||
import { limitAsync } from './limitAsync.mjs';
|
||||
|
||||
async function flatMapAsync(array, callback, options) {
|
||||
if (options?.concurrency != null) {
|
||||
callback = limitAsync(callback, options.concurrency);
|
||||
}
|
||||
const results = await Promise.all(array.map(callback));
|
||||
return flatten(results);
|
||||
}
|
||||
|
||||
export { flatMapAsync };
|
||||
Reference in New Issue
Block a user