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

Function readNullableString

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

Source from the content-addressed store, hash-verified

208}
209
210function readNullableString(
211 obj: JsonObject,
212 key: string,
213 path: string,
214): ReproParseResult<string | null> {
215 const value = obj[key];
216 if (value === null || typeof value === "string") {
217 return ok(value);
218 }
219 return fail("ZR_REPRO_INVALID_BUNDLE", path, "expected string or null");
220}
221
222function readNullableNonNegativeInteger(
223 obj: JsonObject,

Callers 1

Calls 2

okFunction · 0.70
failFunction · 0.70

Tested by

no test coverage detected