This commit is contained in:
Jan Prochazka
2021-09-25 12:08:20 +02:00
parent f92153d957
commit 065af0b4a8
6 changed files with 76 additions and 12 deletions

View File

@@ -32,3 +32,9 @@ export function getObjectTypeFieldLabel(objectTypeField) {
if (objectTypeField == 'matviews') return 'Materialized Views';
return _.startCase(objectTypeField);
}
export async function asyncFilter(arr, predicate) {
const results = await Promise.all(arr.map(predicate));
return arr.filter((_v, index) => results[index]);
}