(node, scope)
| 448 | } |
| 449 | |
| 450 | function evaluateUnaryExpression(node, scope) { |
| 451 | const value = evaluateNode(node.argument, scope); |
| 452 | switch (node.operator) { |
| 453 | case "+": |
| 454 | return +value; |
| 455 | case "-": |
| 456 | return -value; |
| 457 | case "!": |
| 458 | return !value; |
| 459 | default: |
| 460 | throw new Error(`Unsupported unary operator: ${node.operator}`); |
| 461 | } |
| 462 | } |
| 463 | |
| 464 | function normalizePath(path) { |
| 465 | let result = String(path || "").replace(/\\/g, "/"); |
no test coverage detected