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

Callers 3

readScheduleConfigFunction · 0.85
parseTimeArgsFunction · 0.85
CyPluginClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected