* Remove outer single or double quotes from a string * @param text Text to clean * @returns Text without outer quotes
(text: string)
| 275 | * @returns Text without outer quotes |
| 276 | */ |
| 277 | function removeOuterQuotes(text: string): string { |
| 278 | if ( |
| 279 | (text.startsWith('"') && text.endsWith('"')) || |
| 280 | (text.startsWith("'") && text.endsWith("'")) |
| 281 | ) { |
| 282 | return text.slice(1, -1) |
| 283 | } |
| 284 | return text |
| 285 | } |
| 286 | |
| 287 | /** |
| 288 | * Remove shell escape backslashes from a path (for macOS/Linux/WSL) |
no outgoing calls
no test coverage detected