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

Function recordToCode

packages/parsers/src/gsapWriterAcorn.ts:680–683  ·  view source on GitHub ↗

Serialize a final keyframe property record (number|string values) to code.

(record: Record<string, number | string>)

Source from the content-addressed store, hash-verified

678
679/** Serialize a final keyframe property record (number|string values) to code. */
680function recordToCode(record: Record<string, number | string>): string {
681 const entries = Object.entries(record).map(([k, v]) => `${safeKey(k)}: ${valueToCode(v)}`);
682 return `{ ${entries.join(", ")} }`;
683}
684
685/** Percentage-keyed property nodes of a keyframes ObjectExpression, in source order. */
686function percentagePropsOf(kfNode: Node): Node[] {

Callers 5

buildConvertedVarsCodeFunction · 0.85
updateKeyframeInScriptFunction · 0.85
updateArrayKeyframeByPctFunction · 0.85
addKeyframeToScriptFunction · 0.85
moveKeyframeInScriptFunction · 0.85

Calls 3

safeKeyFunction · 0.85
valueToCodeFunction · 0.85
entriesMethod · 0.80

Tested by

no test coverage detected