MCPcopy Create free account
hub / github.com/arktypeio/arktype / printable

Function printable

ark/aot/util.ts:49–56  ·  view source on GitHub ↗
(data: unknown)

Source from the content-addressed store, hash-verified

47 s ? s[0].toUpperCase() + s.slice(1) : s
48
49export const printable = (data: unknown): string =>
50 typeof data === "string" ? JSON.stringify(data)
51 : typeof data === "symbol" ? String(data)
52 : data === undefined ? "undefined"
53 : data === null ? "null"
54 : typeof data === "bigint" ? `${data}n`
55 : typeof data === "object" ? JSON.stringify(data)
56 : String(data)
57
58export const stringifyPath = (path: readonly PropertyKey[]): string => {
59 let result = ""

Callers 15

getAbsolutePositionFunction · 0.90
printFailedFunction · 0.90
assertions.tsFile · 0.90
instanceOfMethod · 0.90
inlineMethod · 0.90
checkedMemberFunction · 0.90
heldHandlerOfFunction · 0.90
replayFunction · 0.90
describeCallFunction · 0.90
observationFunction · 0.90
compareFunction · 0.90
cellsOfMethod · 0.90

Calls 1

StringInterface · 0.85

Tested by

no test coverage detected