MCPcopy Index your code
hub / github.com/midrender/revideo / parseCodeScope

Function parseCodeScope

packages/2d/src/lib/code/CodeScope.ts:39–55  ·  view source on GitHub ↗
(value: PossibleCodeScope)

Source from the content-addressed store, hash-verified

37}
38
39export function parseCodeScope(value: PossibleCodeScope): CodeScope {
40 if (typeof value === 'string') {
41 return {
42 progress: 0,
43 fragments: [value],
44 };
45 }
46
47 if (Array.isArray(value)) {
48 return {
49 progress: 0,
50 fragments: value,
51 };
52 }
53
54 return value;
55}
56
57type IsAfterPredicate = ((scope: CodeScope) => boolean) | boolean;
58

Callers 1

parseMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected