Libraries
    Preparing search index...

    Function safeSerialize

    • Safely serializes a value for structured logging, handling:

      • Circular references → "[Circular]"
      • Depth limits → "[Object]" or "[Array]"
      • BigInt → string representation
      • Buffer → "[Buffer(N bytes)]"
      • Functions → "[Function: name]"
      • Symbols → "[Symbol: description]"
      • Error objects → { message, stack, name, ...ownProperties }
      • Long strings → truncated with "...(truncated)"

      Parameters

      Returns unknown

      a JSON-safe representation of the value