(str)
| 1102 | const DOLLAR = "$".charCodeAt(0); |
| 1103 | |
| 1104 | function convertToTemplateLiteral(str) { |
| 1105 | let escapedString = ""; |
| 1106 | |
| 1107 | for (let i = 0; i < str.length; i++) { |
| 1108 | const code = str.charCodeAt(i); |
| 1109 | |
| 1110 | escapedString += |
| 1111 | code === SLASH || code === BACKTICK || code === DOLLAR |
| 1112 | ? `\\${str[i]}` |
| 1113 | : str[i]; |
| 1114 | } |
| 1115 | |
| 1116 | return `\`${escapedString}\``; |
| 1117 | } |
| 1118 | |
| 1119 | function dashesCamelCase(str) { |
| 1120 | return str.replace(/-+(\w)/g, (match, firstLetter) => |
no outgoing calls
no test coverage detected
searching dependent graphs…