(path)
| 125 | } |
| 126 | }, |
| 127 | LogicalExpression(path) { |
| 128 | if (value === null) return; |
| 129 | |
| 130 | const res = evaluate(path.node, value); |
| 131 | if (res.unrelated) return; |
| 132 | if (res.replacement) { |
| 133 | path.replaceWith(res.replacement); |
| 134 | } else { |
| 135 | path.replaceWith(t.booleanLiteral(res.value)); |
| 136 | } |
| 137 | }, |
| 138 | MemberExpression(path) { |
| 139 | if (value === null) return; |
| 140 |
nothing calls this directly
no test coverage detected