MCPcopy Create free account
hub / github.com/ColmapView/Colmapview.github.io / parseFiniteNumberString

Function parseFiniteNumberString

src/utils/numberParsing.ts:26–32  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

24}
25
26export function parseFiniteNumberString(value: string): number | null {
27 const trimmedValue = value.trim();
28 if (!FINITE_NUMBER_STRING_PATTERN.test(trimmedValue)) return null;
29
30 const parsed = Number(trimmedValue);
31 return Number.isFinite(parsed) ? parsed : null;
32}

Callers 7

applyOpacityInputValueFunction · 0.90
parseSliderRangeValueFunction · 0.90
decodeCameraStateLegacyFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected