This commit is contained in:
Iliyan Angelov
2025-09-14 23:24:25 +03:00
commit c67067a2a4
71311 changed files with 6800714 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
const isMotionValue = (value) => Boolean(value && value.getVelocity);
export { isMotionValue };

View File

@@ -0,0 +1,16 @@
import { isCustomValue } from '../../utils/resolve-value.mjs';
import { isMotionValue } from './is-motion-value.mjs';
/**
* If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself
*
* TODO: Remove and move to library
*/
function resolveMotionValue(value) {
const unwrappedValue = isMotionValue(value) ? value.get() : value;
return isCustomValue(unwrappedValue)
? unwrappedValue.toValue()
: unwrappedValue;
}
export { resolveMotionValue };