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

Function toNumber

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

Source from the content-addressed store, hash-verified

46}
47
48export function toNumber(v: any): number | null {
49 if (isEmpty(v)) return null;
50 if (isNaN(Number(v))) return null;
51 return Number(v);
52}
53
54export function toBoolean(v: any): boolean | null {
55 if (isEmpty(v)) return null;

Callers 6

buyOrRenewInstanceFunction · 0.85
execMethod · 0.85
info_router.tsFile · 0.85
Instance_router.tsFile · 0.85

Calls 1

isEmptyFunction · 0.85

Tested by

no test coverage detected