mirror of
https://github.com/Doodle3D/Doodle3D-Core.git
synced 2025-01-03 08:33:48 +01:00
add 3d argument to asyncIterator callback
This commit is contained in:
parent
0ed0a98efa
commit
22bd0b6953
@ -18,7 +18,7 @@ export async function asyncIterator(array, callback) {
|
|||||||
const result = [];
|
const result = [];
|
||||||
for (let i = 0; i < array.length; i ++) {
|
for (let i = 0; i < array.length; i ++) {
|
||||||
const item = array[i];
|
const item = array[i];
|
||||||
const itemResult = await callback(item, i);
|
const itemResult = await callback(item, i, array);
|
||||||
result.push(itemResult);
|
result.push(itemResult);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
Reference in New Issue
Block a user