1.0.1 • Published 4 years ago
babel-plugin-simplify-ternary-expressions v1.0.1
simplify-ternary-expressions
When a ternary expression is found, and the value is not used, it is converted to an If statement. Alternatively, if the value is used in a return statement, it is converted to an If statement with return statements on both branches.
When a logical expression is found, and the value is not used, it is converted to an If statement.
Options:
convertReturnStatements
: Whether or not to convert ternary expressions in return statements.
1.0.1
4 years ago