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

Function parseLocatedCached

packages/sdk/src/document.ts:45–53  ·  view source on GitHub ↗
(script: string)

Source from the content-addressed store, hash-verified

43let gsapLocatedCacheVal: Array<{ id: string; selector: string }> = [];
44
45function parseLocatedCached(script: string): Array<{ id: string; selector: string }> {
46 if (gsapLocatedCacheKey === script) return gsapLocatedCacheVal;
47 const parsed = parseGsapScriptAcornForWrite(script);
48 gsapLocatedCacheVal = parsed
49 ? parsed.located.map(({ id, animation }) => ({ id, selector: animation.targetSelector }))
50 : [];
51 gsapLocatedCacheKey = script;
52 return gsapLocatedCacheVal;
53}
54
55/**
56 * Map each element's data-hf-id → the GSAP tween ids targeting it. Tween ids

Callers 1

buildAnimationIdMapFunction · 0.85

Calls 1

Tested by

no test coverage detected