Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function asAsync(values: T[]) {
async function *promises() {
for (const value of values) {
yield await new Promise((resolve) => setTimeout(() => resolve(value), 10))
}
}
return fromAsync(promises)
}