MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / durationFromHtml

Function durationFromHtml

packages/cli/src/commands/info.ts:28–34  ·  view source on GitHub ↗
(html: string, fallback: number)

Source from the content-addressed store, hash-verified

26 * fall back to the computed timeline end.
27 */
28export function durationFromHtml(html: string, fallback: number): number {
29 const match =
30 html.match(/data-composition-id[^>]*data-duration=["']([\d.]+)["']/) ||
31 html.match(/data-duration=["']([\d.]+)["'][^>]*data-composition-id/);
32 const value = match?.[1] ? parseFloat(match[1]) : NaN;
33 return Number.isFinite(value) ? value : fallback;
34}
35
36function totalSize(dir: string): number {
37 let total = 0;

Callers 2

runFunction · 0.85
info.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected