babel-plugin-simplify-ternary-expressions
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i babel-plugin-simplify-ternary-expressions

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

16.4 kB

Total Files

7

Last publish

Collaborators

  • myfatemi04