mirror of
https://github.com/borbann-platform/end-of-semester-report.git
synced 2025-12-18 14:24:04 +01:00
1 line
1.4 KiB
Plaintext
1 line
1.4 KiB
Plaintext
{"version":3,"file":"index-BuqJUpao.cjs","sources":["../../structured-clone/index.ts"],"sourcesContent":["// globalThis polyfill from https://mathiasbynens.be/notes/globalthis\n(function () {\n if (typeof globalThis === \"object\") {\n return;\n }\n Object.defineProperty(Object.prototype, \"__magic__\", {\n get: function () {\n return this;\n },\n configurable: true, // This makes it possible to `delete` the getter later.\n });\n __magic__.globalThis = __magic__; // lolwat\n delete Object.prototype.__magic__;\n})();\n\nconst clone =\n typeof globalThis.structuredClone === \"function\"\n ? globalThis.structuredClone\n : (obj: any) => JSON.parse(JSON.stringify(obj));\n\n/**\n * Wrapper around the built-in structured clone. Uses `JSON.parse(JSON.stringify(...))`\n * as a fallback.\n */\nexport function structuredClone<T>(obj: T): T {\n return clone(obj);\n}\n\ndeclare global {\n const __magic__: any;\n interface Object {\n __magic__?: any;\n }\n}\n"],"names":[],"mappings":";CACC,WAAY;AACL,MAAA,OAAO,eAAe,UAAU;AAChC;AAAA,EAAA;AAEG,SAAA,eAAe,OAAO,WAAW,aAAa;AAAA,IACjD,KAAK,WAAY;AACN,aAAA;AAAA,IACX;AAAA,IACA,cAAc;AAAA;AAAA,EAAA,CACjB;AACD,YAAU,aAAa;AACvB,SAAO,OAAO,UAAU;AAC5B,GAAG;AAEH,MAAM,QACF,OAAO,WAAW,oBAAoB,aAChC,WAAW,kBACX,CAAC,QAAa,KAAK,MAAM,KAAK,UAAU,GAAG,CAAC;AAM/C,SAAS,gBAAmB,KAAW;AAC1C,SAAO,MAAM,GAAG;AACpB;;"} |