(value: unknown)
| 2 | * Converts a value to a string, adding quotes if a string was provided. |
| 3 | */ |
| 4 | export default function quoteString(value: unknown): string { |
| 5 | try { |
| 6 | return typeof value === 'string' ? JSON.stringify(value) : String(value); |
| 7 | // eslint-disable-next-line @typescript-eslint/no-unused-vars |
| 8 | } catch (_ignoreError) { |
| 9 | return JSON.stringify(value); |
| 10 | } |
| 11 | } |
no outgoing calls
no test coverage detected