(input: any)
| 231 | try { |
| 232 | const s = input.toString() |
| 233 | return typeof s === "string" ? s : String(s) |
| 234 | } catch { |
| 235 | return "[toString threw]" |
| 236 | } |
| 237 | } |
| 238 | |
| 239 | /** |
| 240 | * Stringifies a value to JSON safely, silently dropping circular references. |
| 241 | * |
| 242 | * **When to use** |
| 243 | * |