(key: string)
| 590 | } |
| 591 | |
| 592 | function formatJsObjectKey(key: string): string { |
| 593 | if (JS_IDENTIFIER_RE.test(key)) { |
| 594 | return key |
| 595 | } |
| 596 | |
| 597 | return `"${key.replace(/\\/g, '\\\\').replace(/"/g, '\\"')}"` |
| 598 | } |
| 599 | |
| 600 | export function expandShorthands(style: Record<string, string>): Record<string, string> { |
| 601 | const expanded: Record<string, string> = { ...style } |