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