export default async function findAsync(arr, asyncCallback) { const promises = arr.map(asyncCallback); const results = await Promise.all(promises); const index = results.findIndex(result => result); return arr[index]; }