Answers for "array.filter async"

0

array.filter async

const asyncFilter = async (arr, predicate) => Promise.all(arr.map(predicate))
	.then((results) => arr.filter((_v, index) => results[index]));
Posted by: Guest on December-31-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language