(value: unknown)
| 4 | |
| 5 | // Not all strings can be animated (eg: {display: "none"}) |
| 6 | export function isAnimatedString(value: unknown): value is string { |
| 7 | return ( |
| 8 | is.str(value) && |
| 9 | (value[0] == '#' || |
| 10 | /\d/.test(value) || |
| 11 | // Do not identify a CSS variable as an AnimatedString if its SSR |
| 12 | (!isSSR() && cssVariableRegex.test(value)) || |
| 13 | value in (G.colors || {})) |
| 14 | ) |
| 15 | } |
no test coverage detected
searching dependent graphs…