MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / normalizeLimit

Function normalizeLimit

cy/cy.ts:97–101  ·  view source on GitHub ↗
(value: unknown, fallback = DEFAULT_LIMIT)

Source from the content-addressed store, hash-verified

95}
96
97function normalizeLimit(value: unknown, fallback = DEFAULT_LIMIT): number {
98 const num = Number(value);
99 if (!Number.isFinite(num) || num <= 0) return fallback;
100 return Math.max(50, Math.min(MAX_LIMIT, Math.floor(num)));
101}
102
103function readScheduleConfig(): CyScheduleConfig {
104 try {

Callers 3

readScheduleConfigFunction · 0.85
parseTimeArgsFunction · 0.85
CyPluginClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected