MCPcopy
hub / github.com/google/zx / getFixedSizeArray

Function getFixedSizeArray

test/core.test.js:387–397  ·  view source on GitHub ↗
(size)

Source from the content-addressed store, hash-verified

385
386 test('supports custom intermediate store', async () => {
387 const getFixedSizeArray = (size) => {
388 const arr = []
389 return new Proxy(arr, {
390 get: (target, prop) =>
391 prop === 'push' && arr.length >= size
392 ? () => {
393 /* noop */
394 }
395 : target[prop],
396 })
397 }
398 const store = {
399 stdout: getFixedSizeArray(1),
400 stderr: getFixedSizeArray(1),

Callers 1

core.test.jsFile · 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…