(value: T | FluidValue<T>)
| 189 | |
| 190 | // Compute the goal value, converting "red" to "rgba(255, 0, 0, 1)" in the process |
| 191 | export function computeGoal<T>(value: T | FluidValue<T>): T { |
| 192 | const resolved = getFluidValue(value) |
| 193 | if (is.arr(resolved)) { |
| 194 | return resolved.map(computeGoal) as T |
| 195 | } |
| 196 | if (isAnimatedString(resolved)) { |
| 197 | return G.createStringInterpolator({ |
| 198 | range: [0, 1], |
| 199 | output: [resolved, resolved], |
| 200 | })(1) as T |
| 201 | } |
| 202 | return resolved as T |
| 203 | } |
| 204 | |
| 205 | export function hasProps(props: object) { |
| 206 | for (const _ in props) return true |
no test coverage detected
searching dependent graphs…