MCPcopy
hub / github.com/simstudioai/sim / toDurationString

Function toDurationString

apps/sim/tools/temporal/utils.ts:214–219  ·  view source on GitHub ↗
(seconds: number | string | undefined)

Source from the content-addressed store, hash-verified

212 * Returns undefined for missing, non-numeric, or non-positive values so the field is omitted.
213 */
214export function toDurationString(seconds: number | string | undefined): string | undefined {
215 if (seconds == null || seconds === '') return undefined
216 const parsed = Number(seconds)
217 if (!Number.isFinite(parsed) || parsed <= 0) return undefined
218 return `${parsed}s`
219}
220
221/**
222 * Maps a raw `WorkflowExecutionInfo` to the flat execution summary shared by the

Callers 3

start_workflow.tsFile · 0.90
create_schedule.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected