Grabbed dndbeyond's source code
``` ~/go/bin/sourcemapper -output ddb -jsurl https://media.dndbeyond.com/character-app/static/js/main.90aa78c5.js ```
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
"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;
|
||||
}
|
||||
Reference in New Issue
Block a user