resolve-value.mjs 413 B

1234567891011
  1. import { isKeyframesTarget } from '../animation/utils/is-keyframes-target.mjs';
  2. const isCustomValue = (v) => {
  3. return Boolean(v && typeof v === "object" && v.mix && v.toValue);
  4. };
  5. const resolveFinalValueInKeyframes = (v) => {
  6. // TODO maybe throw if v.length - 1 is placeholder token?
  7. return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v;
  8. };
  9. export { isCustomValue, resolveFinalValueInKeyframes };