2025-05-28 15:36:51 -07:00

20 lines
469 B
JavaScript

"use strict";
exports.__esModule = true;
exports["default"] = stripStyle;
// turn {x: {val: 1, stiffness: 1, damping: 2}, y: 2} generated by
// `{x: spring(1, {stiffness: 1, damping: 2}), y: 2}` into {x: 1, y: 2}
function stripStyle(style) {
var ret = {};
for (var key in style) {
if (!Object.prototype.hasOwnProperty.call(style, key)) {
continue;
}
ret[key] = typeof style[key] === 'number' ? style[key] : style[key].val;
}
return ret;
}