(value: string)
| 849 | } |
| 850 | |
| 851 | function stringifyValue(value: string) { |
| 852 | if (value.includes('\0')) { |
| 853 | if ( |
| 854 | value.startsWith('\0') && |
| 855 | value.endsWith('\0') && |
| 856 | value.indexOf('\0', 1) === value.length - 1 |
| 857 | ) { |
| 858 | return value.substring(1, value.length - 1) |
| 859 | } |
| 860 | |
| 861 | const parts = value.split('\0') |
| 862 | const template = parts |
| 863 | .map((part, index) => |
| 864 | index % 2 === 0 ? escapeJsTemplateLiteralText(part) : '${' + part + '}' |
| 865 | ) |
| 866 | .join('') |
| 867 | |
| 868 | return '`' + template + '`' |
| 869 | } |
| 870 | |
| 871 | return `'${escapeJsSingleQuotedString(value)}'` |
| 872 | } |
| 873 | |
| 874 | const processedStyle = Object.fromEntries( |
| 875 | Object.entries(style) |
no test coverage detected