(value)
| 32 | }; |
| 33 | |
| 34 | const getValueString = (value) => { |
| 35 | // Handle null, undefined, and empty strings |
| 36 | if (!value) { |
| 37 | return ''; |
| 38 | } |
| 39 | |
| 40 | const hasNewLines = value.includes('\n') || value.includes('\r'); |
| 41 | |
| 42 | if (!hasNewLines) { |
| 43 | return value; |
| 44 | } |
| 45 | |
| 46 | // Wrap multiline values in triple quotes with 2-space indentation |
| 47 | return `'''\n${indentString(value)}\n'''`; |
| 48 | }; |
| 49 | |
| 50 | const getKeyString = (key) => { |
| 51 | const quotableChars = [':', '"', '{', '}', ' ']; |
no test coverage detected