MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / normalizeViewport

Function normalizeViewport

scripts/hsr/widget-layout.mjs:16–21  ·  view source on GitHub ↗
(viewport)

Source from the content-addressed store, hash-verified

14}
15
16export function normalizeViewport(viewport) {
17 const source = typeof viewport === "object" && viewport !== null ? viewport : {};
18 const cols = normalizeDimension(source.cols, DEFAULT_COLS, MIN_COLS);
19 const rows = normalizeDimension(source.rows, DEFAULT_ROWS, MIN_ROWS);
20 return Object.freeze({ cols, rows });
21}
22
23export function resolveWidgetDemoLayout(viewport) {
24 const normalized = normalizeViewport(viewport);

Callers 3

renderWidgetScreenFunction · 0.90
resolveWidgetDemoLayoutFunction · 0.70

Calls 1

normalizeDimensionFunction · 0.85

Tested by

no test coverage detected