MCPcopy Create free account
hub / github.com/effect-app/libs / asReadonlyArray

Function asReadonlyArray

packages/effect-app/src/Model/Repository/ext.ts:22–25  ·  view source on GitHub ↗
(itemOrItems: T | ReadonlyArray<T>)

Source from the content-addressed store, hash-verified

20}
21
22const asReadonlyArray = <T>(itemOrItems: T | ReadonlyArray<T>): ReadonlyArray<T> =>
23 globalThis.Array.isArray(itemOrItems)
24 ? itemOrItems as ReadonlyArray<T>
25 : [itemOrItems as T]
26
27const getBatchSize = (batch?: true | number) =>
28 batch === true

Callers 1

extendRepoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…