MCPcopy Create free account
hub / github.com/MCSManager/MCSManager / toBoolean

Function toBoolean

common/src/typecheck.ts:54–57  ·  view source on GitHub ↗
(v: any)

Source from the content-addressed store, hash-verified

52}
53
54export function toBoolean(v: any): boolean | null {
55 if (isEmpty(v)) return null;
56 return Boolean(v);
57}
58
59export function isEmpty(v: any): boolean {
60 return v === null || v === undefined;

Callers 3

info_router.tsFile · 0.85

Calls 1

isEmptyFunction · 0.85

Tested by

no test coverage detected