You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

21 lines
506 B

  1. // turn {x: {val: 1, stiffness: 1, damping: 2}, y: 2} generated by
  2. // `{x: spring(1, {stiffness: 1, damping: 2}), y: 2}` into {x: 1, y: 2}
  3. 'use strict';
  4. exports.__esModule = true;
  5. exports['default'] = stripStyle;
  6. function stripStyle(style) {
  7. var ret = {};
  8. for (var key in style) {
  9. if (!Object.prototype.hasOwnProperty.call(style, key)) {
  10. continue;
  11. }
  12. ret[key] = typeof style[key] === 'number' ? style[key] : style[key].val;
  13. }
  14. return ret;
  15. }
  16. module.exports = exports['default'];