MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / normalizeIndex

Function normalizeIndex

src/pages/problems/problems.js:159–168  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

157 }
158
159 function normalizeIndex(value) {
160 if (typeof value === "number" && Number.isFinite(value)) {
161 return Math.max(0, value);
162 }
163 const parsed = Number(value);
164 if (Number.isFinite(parsed)) {
165 return Math.max(0, parsed);
166 }
167 return 0;
168 }
169
170 function normalizeSeverity(severity) {
171 switch (severity) {

Callers 3

clickHandlerFunction · 0.85
collectAnnotationsFunction · 0.85
readLspAnnotationsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected