MCPcopy Create free account
hub / github.com/Effect-TS/effect / fromPubSubArray

Function fromPubSubArray

packages/effect/src/Channel.ts:1601–1602  ·  view source on GitHub ↗
(pubsub: PubSub.PubSub<A>)

Source from the content-addressed store, hash-verified

1599 * @since 4.0.0
1600 */
1601export const fromPubSubArray = <A>(pubsub: PubSub.PubSub<A>): Channel<Arr.NonEmptyReadonlyArray<A>> =>
1602 unwrap(Effect.map(PubSub.subscribe(pubsub), fromSubscriptionArray))
1603
1604/**
1605 * Subscribes to a `PubSub` of `Take` values and exposes them as a channel.

Callers

nothing calls this directly

Calls 3

unwrapFunction · 0.70
subscribeMethod · 0.65
mapMethod · 0.45

Tested by

no test coverage detected