(name: string, suffix: string, hasExtension?: boolean)
| 34 | } |
| 35 | |
| 36 | function addSuffix(name: string, suffix: string, hasExtension?: boolean): string { |
| 37 | if (hasExtension) { |
| 38 | const dotIndex = name.lastIndexOf('.') |
| 39 | if (dotIndex > 0) { |
| 40 | return `${name.slice(0, dotIndex)}${suffix}${name.slice(dotIndex)}` |
| 41 | } |
| 42 | } |
| 43 | return `${name}${suffix}` |
| 44 | } |
no outgoing calls
no test coverage detected