/* @flow */ // 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} import type {Style, PlainStyle} from './Types'; export default function stripStyle(style: Style): PlainStyle { let ret = {}; for (const key in style) { if (!Object.prototype.hasOwnProperty.call(style, key)) { continue; } ret[key] = typeof style[key] === 'number' ? style[key] : style[key].val; } return ret; }