R
fn

cloneFnDefault

testeddemo

Default clone implementation. Prefers the structured clone algorithm and falls back to a JSON round-trip when `structuredClone` is unavailable (older runtimes / SSR) or the value is not structured-cloneable.

Demo

Loading demo…

Signature

ts
export function cloneFnDefault<T>(source: T): T{ ... }

Type Parameters

T

Parameters

ParameterTypeDescription
sourceT

Returns

T