rebuild hrm
This commit is contained in:
16
node_modules/es-toolkit/dist/array/flatMapAsync.js
generated
vendored
Normal file
16
node_modules/es-toolkit/dist/array/flatMapAsync.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
|
||||
const flatten = require('./flatten.js');
|
||||
const limitAsync = require('./limitAsync.js');
|
||||
|
||||
async function flatMapAsync(array, callback, options) {
|
||||
if (options?.concurrency != null) {
|
||||
callback = limitAsync.limitAsync(callback, options.concurrency);
|
||||
}
|
||||
const results = await Promise.all(array.map(callback));
|
||||
return flatten.flatten(results);
|
||||
}
|
||||
|
||||
exports.flatMapAsync = flatMapAsync;
|
||||
Reference in New Issue
Block a user