(interpolator: Interpolator)
| 106 | export type Interpolator = (value: string, variables: Variables) => string |
| 107 | |
| 108 | export function preprocessArray(interpolator: Interpolator) { |
| 109 | return function preprocessArray( |
| 110 | items: [string, string][], |
| 111 | variables: Variables |
| 112 | ) { |
| 113 | return items.map((item) => [ |
| 114 | interpolator(item[0], variables), |
| 115 | interpolator(item[1], variables), |
| 116 | ]) |
| 117 | } |
| 118 | } |
| 119 | |
| 120 | export function interpolateString(value: string, variables: Variables) { |
| 121 | if (!value) return '' |
no outgoing calls
no test coverage detected