Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/effection/lib/mod.ts>subscribe

Structured concurrency and effects for JavaScript
Latest
function subscribe
import { subscribe } from "https://deno.land/x/effection@4.0.0-alpha.1/lib/mod.ts";

Convert any AsyncIterator into an effection Subscription

This allows you to consume any AsyncIterator as a Subscription.

Parameters

iter: AsyncIterator<T, R>
  • the iterator to convert

Returns

a subscription that will produce each item of iter