Skip to content

postgrestx-monorepo v0.0.1


postgrestx-monorepo / tanstack/src / stableStringify

Function: stableStringify()

stableStringify(value): string

Defined in: packages/tanstack/src/keys.ts:71

Deterministic JSON stringify: sorts object keys deeply so structurally equivalent objects with different key insertion order produce identical serialized strings. Used internally by pgKey.

Parameters

value

unknown

Returns

string

Example

ts
stableStringify({ b: 1, a: 2 }) === stableStringify({ a: 2, b: 1 }) // true