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

Function stripRanges

packages/cli/src/commands/keyframes.ts:286–294  ·  view source on GitHub ↗
(text: string, ranges: Array<{ start: number; end: number }>)

Source from the content-addressed store, hash-verified

284}
285
286function stripRanges(text: string, ranges: Array<{ start: number; end: number }>): string {
287 let out = "";
288 let cursor = 0;
289 for (const range of [...ranges].sort((a, b) => a.start - b.start)) {
290 out += text.slice(cursor, range.start);
291 cursor = range.end;
292 }
293 return out + text.slice(cursor);
294}
295
296function collectKeyframeBlocks(css: string): {
297 keyframes: Array<{ name: string; stops: CssKeyframeStop[] }>;

Callers 1

surfaceCssKeyframesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected