(value: any)
| 47 | } |
| 48 | |
| 49 | const formatValue = (value: any): any => { |
| 50 | if (typeof value === 'string') { |
| 51 | return this.formatMultilineString(value); |
| 52 | } |
| 53 | if (typeof value === 'object' && value !== null) { |
| 54 | if (Array.isArray(value)) { |
| 55 | return value.map(formatValue); |
| 56 | } |
| 57 | const formatted: any = {}; |
| 58 | for (const [key, val] of Object.entries(value)) { |
| 59 | formatted[key] = formatValue(val); |
| 60 | } |
| 61 | return formatted; |
| 62 | } |
| 63 | return value; |
| 64 | }; |
| 65 | |
| 66 | return JSON.stringify(formatValue(data), null, 4); |
| 67 | } |
nothing calls this directly
no test coverage detected