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

Function fromIterable

packages/effect/src/Stream.ts:947–955  ·  view source on GitHub ↗
(
  iterable: Iterable<A>,
  options?: {
    readonly chunkSize?: number | undefined
  }
)

Source from the content-addressed store, hash-verified

945 * @since 2.0.0
946 */
947export const fromIterable = <A>(
948 iterable: Iterable<A>,
949 options?: {
950 readonly chunkSize?: number | undefined
951 }
952): Stream<A> =>
953 Array.isArray(iterable) && options?.chunkSize === undefined
954 ? fromArray(iterable)
955 : fromChannel(Channel.fromIterableArray(iterable, options?.chunkSize))
956
957/**
958 * Creates a stream from an effect producing an iterable of values.

Callers 1

Stream.tsFile · 0.70

Calls 2

fromArrayFunction · 0.70
fromChannelFunction · 0.70

Tested by

no test coverage detected