(nodePath, state)
| 109 | |
| 110 | // typeof window |
| 111 | UnaryExpression(nodePath, state) { |
| 112 | if (nodePath.node.operator !== "typeof") { return; } |
| 113 | |
| 114 | const { opts } = state; |
| 115 | const keys = Object.keys(opts); |
| 116 | const typeofValues = {}; |
| 117 | |
| 118 | keys.forEach((key) => { |
| 119 | if (key.substring(0, TYPEOF_PREFIX.length) === TYPEOF_PREFIX) { |
| 120 | typeofValues[key.substring(TYPEOF_PREFIX.length)] = opts[key]; |
| 121 | } |
| 122 | }); |
| 123 | |
| 124 | processNode(typeofValues, nodePath, t.valueToNode, unaryExpressionComparator); |
| 125 | } |
| 126 | |
| 127 | } |
| 128 | }; |
nothing calls this directly
no test coverage detected
searching dependent graphs…