UNPKG

livekit-client

Version:

JavaScript/TypeScript client SDK for LiveKit

12 lines (10 loc) 246 B
export function cloneDeep<T>(value: T) { if (typeof value === 'undefined') { return; } if (typeof structuredClone === 'function') { return structuredClone(value); } else { return JSON.parse(JSON.stringify(value)) as T; } }