1
0

stripStyle.ts 360 B

1234567891011
  1. /* eslint-disable no-restricted-syntax */
  2. export default function stripStyle(style: Record<string, any>) {
  3. const ret = {};
  4. for (const key in style) {
  5. if (!Object.prototype.hasOwnProperty.call(style, key)) {
  6. continue;
  7. }
  8. ret[key] = typeof style[key] === 'number' ? style[key] : style[key].val;
  9. }
  10. return ret;
  11. }