Function stableStringify

  • Parameters

    • value: unknown

      value to stringify

    • Optional seen: Set<object>

      set of objects currently on the recursion path (circular reference guard)

    Returns string

    Description

    Deterministic JSON-like stringification of arbitrary values.

    • Object keys are sorted alphabetically.
    • Functions and symbols are replaced with constant markers.
    • Circular references produce an empty string for the repeated path. Used internally by stableHash to produce consistent call keys.