( template: string, row: Record<string, unknown>, index: number, )
| 141 | } |
| 142 | |
| 143 | export 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 | |
| 153 | function isSameOrChildPath(path: string, parent: string): boolean { |
| 154 | return path === parent || path.startsWith(parent.endsWith(sep) ? parent : parent + sep); |
no test coverage detected