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

Function resolveOutputTemplate

packages/cli/src/commands/batchRender.ts:143–151  ·  view source on GitHub ↗
(
  template: string,
  row: Record<string, unknown>,
  index: number,
)

Source from the content-addressed store, hash-verified

141}
142
143export function resolveOutputTemplate(
144 template: string,
145 row: Record<string, unknown>,
146 index: number,
147): string {
148 return template.replace(PLACEHOLDER_RE, (_match, key: string) =>
149 placeholderValue(row, key, index),
150 );
151}
152
153function isSameOrChildPath(path: string, parent: string): boolean {
154 return path === parent || path.startsWith(parent.endsWith(sep) ? parent : parent + sep);

Callers 2

prepareBatchRenderFunction · 0.85

Calls 1

placeholderValueFunction · 0.85

Tested by

no test coverage detected