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

Function fromArray

packages/effect/src/Stream.ts:1045–1046  ·  view source on GitHub ↗
(array: ReadonlyArray<A>)

Source from the content-addressed store, hash-verified

1043 * @since 4.0.0
1044 */
1045export const fromArray = <A>(array: ReadonlyArray<A>): Stream<A> =>
1046 Arr.isReadonlyArrayNonEmpty(array) ? fromChannel(Channel.succeed(array)) : empty
1047
1048/**
1049 * Creates a stream from an effect that produces an array of values.

Callers 3

makeFunction · 0.70
fromIterableFunction · 0.70
Stream.tsFile · 0.70

Calls 2

fromChannelFunction · 0.70
succeedMethod · 0.45

Tested by

no test coverage detected