(text)
| 272 | } |
| 273 | |
| 274 | function parseJsonLike(text) { |
| 275 | const trimmed = text?.trim(); |
| 276 | if (!trimmed) return null; |
| 277 | const parsed = helpers.parseJSON(trimmed); |
| 278 | if (parsed) return parsed; |
| 279 | try { |
| 280 | return parseSafeExpression(trimmed); |
| 281 | } catch (_) { |
| 282 | return null; |
| 283 | } |
| 284 | } |
| 285 | |
| 286 | function parseJsConfig(directory, source, absolutePath) { |
| 287 | if (!source) return null; |
no test coverage detected