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

Function fromArrayUnsafe

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

Source from the content-addressed store, hash-verified

560 * @since 4.0.0
561 */
562export const fromArrayUnsafe = <A>(self: ReadonlyArray<A>): Chunk<A> =>
563 self.length === 0 ? empty() : self.length === 1 ? of(self[0]) : makeChunk({ _tag: "IArray", array: self })
564
565/**
566 * Wraps a non-empty array into a non-empty chunk without copying.

Callers 10

fromIterableFunction · 0.85
reverseChunkFunction · 0.85
fromNonEmptyArrayUnsafeFunction · 0.85
Chunk.tsFile · 0.85
compactFunction · 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