@ -20,6 +20,19 @@ if (!String.prototype.padStart) {
};
}
if (!Object.fromEntries) {
Object.fromEntries = function(entries) {
const obj = {};
for (let i = 0; i < entries.length; ++i) {
const entry = entries[i];
if (entry && entry.length === 2) {
obj[entry[0]] = entry[1];
return obj;
export function copy(obj) {
return JSON.parse(JSON.stringify(obj));