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

Function appendArray

packages/effect/src/internal/schema/toArbitrary.ts:93–100  ·  view source on GitHub ↗
(
  fc: typeof FastCheck,
  out: FastCheck.Arbitrary<Array<any>>,
  len: number,
  rest: FastCheck.Arbitrary<ReadonlyArray<any>>
)

Source from the content-addressed store, hash-verified

91}
92
93function appendArray(
94 fc: typeof FastCheck,
95 out: FastCheck.Arbitrary<Array<any>>,
96 len: number,
97 rest: FastCheck.Arbitrary<ReadonlyArray<any>>
98) {
99 return out.chain((as) => as.length < len ? fc.constant(as) : rest.map((rest) => [...as, ...rest]))
100}
101
102function appendObjectEntries(
103 out: FastCheck.Arbitrary<any>,

Callers 2

terminalFunction · 0.85
baseFunction · 0.85

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected