(ast)
| 592 | } |
| 593 | |
| 594 | isAstMathVariable(ast) { |
| 595 | const mathProperties = [ |
| 596 | 'E', |
| 597 | 'PI', |
| 598 | 'SQRT2', |
| 599 | 'SQRT1_2', |
| 600 | 'LN2', |
| 601 | 'LN10', |
| 602 | 'LOG2E', |
| 603 | 'LOG10E', |
| 604 | ]; |
| 605 | return ast.type === 'MemberExpression' && |
| 606 | ast.object && ast.object.type === 'Identifier' && |
| 607 | ast.object.name === 'Math' && |
| 608 | ast.property && |
| 609 | ast.property.type === 'Identifier' && |
| 610 | mathProperties.indexOf(ast.property.name) > -1; |
| 611 | } |
| 612 | |
| 613 | isAstMathFunction(ast) { |
| 614 | const mathFunctions = [ |
no outgoing calls
no test coverage detected