svelte-motion
Version:
Svelte animation library based on the React library framer-motion.
15 lines (13 loc) • 323 B
JavaScript
/**
based on framer-motion@4.0.3,
Copyright (c) 2018 Framer B.V.
*/
/**
* Provided a value and a ValueType, returns the value as that value type.
*/
var getValueAsType = function (value, type) {
return type && typeof value === "number"
? type.transform(value)
: value;
};
export { getValueAsType };