cloneJson
cloneJson<
T>(value):T
Defined in: packages/project-schema/src/canonical.ts:265
Copies a JSON value, keeping the key order it already has.
canonicalClone additionally sorts every object’s keys and re-checks every number, which is what you want at a trust boundary and pure waste inside one: a value taken out of an already-validated document is canonical and checked by construction, and sorting keys that are already in order is the single most expensive thing that clone does.
Use this only on values that came from a validated document or from snapshotProjectInput. It performs no checks: a non-JSON value is copied by reference rather than reported.
Type Parameters
Section titled “Type Parameters”T extends JsonValue
Parameters
Section titled “Parameters”T
Returns
Section titled “Returns”T