MCPcopy Index your code
hub / github.com/simstudioai/sim / formatDuration

Function formatDuration

apps/sim/lib/media/falai-video.ts:127–135  ·  view source on GitHub ↗
(
  format: DurationFormat | undefined,
  duration?: number
)

Source from the content-addressed store, hash-verified

125}
126
127function formatDuration(
128 format: DurationFormat | undefined,
129 duration?: number
130): string | number | undefined {
131 if (!format || duration === undefined) return undefined
132 if (format === 'number') return duration
133 if (format === 'seconds') return `${duration}s`
134 return String(duration)
135}
136
137export async function generateFalVideo(params: GenerateFalVideoParams): Promise<GeneratedVideo> {
138 const model = params.model || DEFAULT_VIDEO_MODEL

Callers 1

generateFalVideoFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected