MCPcopy Create free account
hub / github.com/EvoMap/evolver / toPositiveInt

Function toPositiveInt

src/webui/observer/jsonl.js:63–67  ·  view source on GitHub ↗
(value, fallback)

Source from the content-addressed store, hash-verified

61}
62
63function toPositiveInt(value, fallback) {
64 const n = Number(value);
65 if (!Number.isFinite(n) || n < 0) return fallback;
66 return Math.floor(n);
67}
68
69module.exports = {
70 readJsonSafe,

Callers 3

readJsonlFunction · 0.85
tailTextFunction · 0.85
paginateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected