( text: string, variables: Record<string, string>, )
| 1 | export function interpolate( |
| 2 | text: string, |
| 3 | variables: Record<string, string>, |
| 4 | ): string { |
| 5 | return Object.entries(variables).reduce( |
| 6 | (acc, [key, value]) => acc.replaceAll(`{${key}}`, value), |
| 7 | text, |
| 8 | ); |
| 9 | } |
no outgoing calls
no test coverage detected