(value: T | T[])
| 196 | * Strings are returned as-is, arrays and objects are JSON-stringified. |
| 197 | */ |
| 198 | export function getJsonString<T>(value: T | T[]): string { |
| 199 | if (typeof value === 'string') { |
| 200 | return value; |
| 201 | } |
| 202 | return JSON.stringify(value); |
| 203 | } |
| 204 | |
| 205 | /** |
| 206 | * Get the truncated JSON string for a string or array of strings. |
no outgoing calls
no test coverage detected