Skip to content

The micro-VM for AI agents — light enough to embed on your laptop, elastic enough to power an agentic cloud.

334 B
Raw Blame
/** Evaluates predicates before selecting entries; native Array.filter does not await them. */
export async function filterAsync<T>(values: T[], predicate: (value: T) => Promise<unknown>): Promise<T[]> {
  const selected = await Promise.all(values.map(predicate))
  return values.filter((_value, index) => Boolean(selected[index]))
}