MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / parseDimensionPx

Function parseDimensionPx

packages/core/src/runtime/init.ts:312–317  ·  view source on GitHub ↗
(value: string | null)

Source from the content-addressed store, hash-verified

310 };
311
312 const parseDimensionPx = (value: string | null): string | null => {
313 if (value == null || value.trim() === "") return null;
314 const parsed = Number.parseFloat(value);
315 if (!Number.isFinite(parsed) || parsed <= 0) return null;
316 return `${parsed}px`;
317 };
318
319 const resolveRootCompositionElement = (): HTMLElement | null => findRootCompositionEl();
320

Callers 3

applyCompositionSizingFunction · 0.85
applyClipLayoutFunction · 0.85
postTimelineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected