* Remove outer single or double quotes from a string * @param text Text to clean * @returns Text without outer quotes
(text: string)
| 284 | * @returns Text without outer quotes |
| 285 | */ |
| 286 | function removeOuterQuotes(text: string): string { |
| 287 | if ( |
| 288 | (text.startsWith('"') && text.endsWith('"')) || |
| 289 | (text.startsWith("'") && text.endsWith("'")) |
| 290 | ) { |
| 291 | return text.slice(1, -1) |
| 292 | } |
| 293 | return text |
| 294 | } |
| 295 | |
| 296 | /** |
| 297 | * Remove shell escape backslashes from a path (for macOS/Linux/WSL) |
no outgoing calls
no test coverage detected