Ship 23 transactional templates, shared brand tokens/logo, preview UI, render API, CHANGELOG, and docs for Ecom/Admin/B2B consumers. Co-authored-by: Cursor <cursoragent@cursor.com>
4 lines
175 B
TypeScript
4 lines
175 B
TypeScript
export function interpolate(template: string, vars: Record<string, string | number>) {
|
|
return template.replace(/\{(\w+)\}/g, (_, key: string) => String(vars[key] ?? ''));
|
|
}
|