code: async function filter (arr, callback) {
    const fail = Symbol('filter')
    return (await Promise.all(arr.map(async item => (await callback(item)) ? item : fail))).filter(i => i !== fail)
  }
docs: taken from https://stackoverflow.com/a/46842181/183537