MCPcopy Index your code
hub / github.com/QLHazyCoder/FlowPilot / normalizeAutoStepDelaySeconds

Function normalizeAutoStepDelaySeconds

background.js:336–351  ·  view source on GitHub ↗
(value, fallback = null)

Source from the content-addressed store, hash-verified

334}
335
336function normalizeAutoStepDelaySeconds(value, fallback = null) {
337 const rawValue = String(value ?? '').trim();
338 if (!rawValue) {
339 return fallback;
340 }
341
342 const numeric = Number(rawValue);
343 if (!Number.isFinite(numeric)) {
344 return fallback;
345 }
346
347 return Math.min(
348 AUTO_STEP_DELAY_MAX_ALLOWED_SECONDS,
349 Math.max(AUTO_STEP_DELAY_MIN_ALLOWED_SECONDS, Math.floor(numeric))
350 );
351}
352
353function resolveLegacyAutoStepDelaySeconds(input = {}) {
354 const hasLegacyMin = input.autoStepRandomDelayMinSeconds !== undefined;

Callers 3

executeStepAndWaitFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected