(str: string)
| 43 | * "special characters (\ ` $) will be escaped" -> "special characters (\\ \` \$) will be escaped" |
| 44 | */ |
| 45 | export function escapeStringForJs(str: string) { |
| 46 | return str |
| 47 | .replace(/\\/g, "\\\\") |
| 48 | .replace(/`/g, "\\`") |
| 49 | .replace(/\$/g, "\\$"); |
| 50 | } |
| 51 | |
| 52 | let _mode: SnapshotMode; |
| 53 | /** |
no outgoing calls
no test coverage detected