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

Function toArray

packages/effect/test/Iterable.test.ts:11–16  ·  view source on GitHub ↗
(i: Iterable<A>)

Source from the content-addressed store, hash-verified

9const symC = Symbol.for("c")
10
11const toArray = <A>(i: Iterable<A>) => {
12 if (Array.isArray(i)) {
13 throw new Error("not an iterable")
14 }
15 return Array.from(i)
16}
17
18describe("Iterable", () => {
19 it("of", () => {

Callers 2

Iterable.test.tsFile · 0.70
assertSingleChunkFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected