(raw)
| 97 | } |
| 98 | |
| 99 | function parseTomlValue(raw) { |
| 100 | const value = stripInlineComment(raw); |
| 101 | if ((value.startsWith('"') && value.endsWith('"')) || (value.startsWith("'") && value.endsWith("'"))) { |
| 102 | return value.slice(1, -1); |
| 103 | } |
| 104 | if (value === 'true') return true; |
| 105 | if (value === 'false') return false; |
| 106 | if (/^-?\d+$/.test(value)) return parseInt(value, 10); |
| 107 | return value; |
| 108 | } |
| 109 | |
| 110 | function parseTomlConfig(content) { |
| 111 | const out = {}; |
no test coverage detected