5b2: make the pipe escape terminate, cap the value a document fault echoes
CI / gate (push) Successful in 9s
CI / gate (push) Successful in 9s
This commit is contained in:
+2
-1
@@ -90,7 +90,8 @@ function isRecord(value: unknown): value is Record<string, unknown> {
|
||||
}
|
||||
|
||||
function describe(value: unknown): string {
|
||||
if (typeof value === 'string') return JSON.stringify(value)
|
||||
if (typeof value === 'string') return JSON.stringify(value.length > 40 ? `${value.slice(0, 40)}…` : value)
|
||||
if (typeof value === 'function') return 'a function'
|
||||
if (typeof value === 'object' && value !== null) return Array.isArray(value) ? 'an array' : 'an object'
|
||||
return String(value)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user