Commit 2621ce5c authored by Filipa Lacerda's avatar Filipa Lacerda

Move repeated function to utilities

parent 77c97e3d
......@@ -230,5 +230,13 @@
return upperCaseHeaders;
};
/**
* Transforms a DOMStringMap into a plain object.
*/
w.gl.utils.DOMStringMapToObject = DOMStringMapObject => Object.keys(DOMStringMapObject).reduce((acc, element) => {
acc[element] = DOMStringMapObject[element];
return acc;
}, {});
})(window);
}).call(this);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment