📅  最后修改于: 2022-03-11 15:03:20.807000             🧑  作者: Mango
const asyncFilter = async (arr, predicate) => Promise.all(arr.map(predicate))
.then((results) => arr.filter((_v, index) => results[index]));