MCPcopy Index your code
hub / github.com/Effect-TS/effect / safeToString

Function safeToString

packages/effect/src/Inspectable.ts:60–67  ·  view source on GitHub ↗
(input: any)

Source from the content-addressed store, hash-verified

58}
59
60function safeToString(input: any): string {
61 try {
62 const s = input.toString()
63 return typeof s === "string" ? s : String(s)
64 } catch {
65 return "[toString threw]"
66 }
67}
68
69/** @internal */
70export function formatPropertyKey(name: PropertyKey): string {

Callers 1

goFunction · 0.85

Calls 2

StringInterface · 0.85
toStringMethod · 0.65

Tested by

no test coverage detected