MCPcopy Create free account
hub / github.com/dailydotdev/apps / structuredCloneJsonPolyfill

Function structuredCloneJsonPolyfill

packages/shared/src/lib/structuredClone.ts:12–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10 * @return {*} {void}
11 */
12const structuredCloneJsonPolyfill = (): void => {
13 if (typeof globalThis.structuredClone === 'function') {
14 return;
15 }
16
17 globalThis.structuredClone = <T>(value: T): T => {
18 return JSON.parse(JSON.stringify(value));
19 };
20};

Callers 6

setup.tsFile · 0.90
_app.tsxFile · 0.90
setup.tsFile · 0.90
App.tsxFile · 0.90
App.tsxFile · 0.90
setup.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected