MCPcopy Index your code
hub / github.com/Effect-TS/effect / unsafeFromArray

Function unsafeFromArray

packages/effect/src/Chunk.ts:389–390  ·  view source on GitHub ↗
(self: ReadonlyArray<A>)

Source from the content-addressed store, hash-verified

387 * @category unsafe
388 */
389export const unsafeFromArray = <A>(self: ReadonlyArray<A>): Chunk<A> =>
390 self.length === 0 ? empty() : self.length === 1 ? of(self[0]) : makeChunk({ _tag: "IArray", array: self })
391
392/**
393 * Wraps an array into a chunk without copying, unsafe on mutable arrays

Callers 9

fromIterableFunction · 0.85
reverseChunkFunction · 0.85
unsafeFromNonEmptyArrayFunction · 0.85
Chunk.tsFile · 0.85
separateFunction · 0.85
dedupeFunction · 0.85
dedupeAdjacentFunction · 0.85
unzipFunction · 0.85
differenceWithFunction · 0.85

Calls 3

makeChunkFunction · 0.85
emptyFunction · 0.70
ofFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…