MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / readArray

Function readArray

packages/core/src/repro/schema.ts:237–247  ·  view source on GitHub ↗
(
  obj: JsonObject,
  key: string,
  path: string,
)

Source from the content-addressed store, hash-verified

235}
236
237function readArray(
238 obj: JsonObject,
239 key: string,
240 path: string,
241): ReproParseResult<readonly unknown[]> {
242 const value = obj[key];
243 if (!Array.isArray(value)) {
244 return fail("ZR_REPRO_INVALID_BUNDLE", path, "expected array");
245 }
246 return ok(value);
247}
248
249function readField(obj: JsonObject, key: string): unknown {
250 return obj[key];

Callers 2

parseRecordedEventBatchFunction · 0.85
parseEventCaptureFunction · 0.85

Calls 2

failFunction · 0.70
okFunction · 0.70

Tested by

no test coverage detected