(data: Record<string, () => string>)
| 113 | constructor(private readonly str: string) {} |
| 114 | |
| 115 | render(data: Record<string, () => string>): string { |
| 116 | return this.str.replace(/\$\{([a-zA-Z0-9]+)\}/g, (substr, grp1) => { |
| 117 | return data[grp1](); |
| 118 | }); |
| 119 | } |
| 120 | } |