MCPcopy
hub / github.com/coder/mux / parseBooleanFromInteger

Function parseBooleanFromInteger

src/node/services/analytics/etl.test.ts:122–126  ·  view source on GitHub ↗
(value: unknown, fieldName: string)

Source from the content-addressed store, hash-verified

120}
121
122function parseBooleanFromInteger(value: unknown, fieldName: string): boolean {
123 const parsed = parseInteger(value, fieldName);
124 assert(parsed === 0 || parsed === 1, `${fieldName} should be 0 or 1`);
125 return parsed === 1;
126}
127
128function serializeHeadSignatureValue(value: string | number | null): string {
129 if (value === null) {

Callers 1

etl.test.tsFile · 0.85

Calls 2

parseIntegerFunction · 0.85
assertFunction · 0.50

Tested by

no test coverage detected