MCPcopy Index your code
hub / github.com/simstudioai/sim / resolveNumeric

Function resolveNumeric

apps/sim/lib/workflows/autolayout/utils.ts:31–33  ·  view source on GitHub ↗

* Resolves a potentially undefined numeric value to a fallback

(value: number | undefined, fallback: number)

Source from the content-addressed store, hash-verified

29 * Resolves a potentially undefined numeric value to a fallback
30 */
31function resolveNumeric(value: number | undefined, fallback: number): number {
32 return typeof value === 'number' && Number.isFinite(value) ? value : fallback
33}
34
35/**
36 * Snaps a single coordinate value to the nearest grid position

Callers 2

getContainerMetricsFunction · 0.85
getNoteDimensionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected