Files
Yajbir Singh f1b860b25c
Some checks failed
check / markdownlint (push) Has been cancelled
check / spellchecker (push) Has been cancelled
updated
2025-12-11 19:03:17 +05:30

15 lines
351 B
JavaScript

export const processArrayScripts = async (array, fn) => {
const results = [];
for (const item of array) {
try {
const data = await fn(item);
results.push(data);
} catch (error) {
console.log(`Error with processing element ${item}:`, error);
continue;
}
}
return results;
};