fn
cloneFnDefault
testeddemoDefault 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
TParameters
| Parameter | Type | Description |
|---|---|---|
source | T | — |
Returns
T