(expression: t.Expression)
| 261 | * @param expression The expression to potentially wrap. |
| 262 | */ |
| 263 | export function wrapInParensIfNecessary(expression: t.Expression): t.Expression { |
| 264 | if (t.isBinaryExpression(expression)) { |
| 265 | return t.parenthesizedExpression(expression); |
| 266 | } else { |
| 267 | return expression; |
| 268 | } |
| 269 | } |
| 270 | |
| 271 | /** |
| 272 | * Extract the string values from an `array` of string literals. |
no outgoing calls
no test coverage detected