Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calculator applies only to +-*/ #56

Closed
Le0Developer opened this issue Feb 21, 2023 · 3 comments
Closed

calculator applies only to +-*/ #56

Le0Developer opened this issue Feb 21, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@Le0Developer
Copy link

Describe the bug:

The calculator transformation is only applied to +, -, * and / (https://github.com/MichaelXF/js-confuser/blob/master/src/transforms/calculator.ts#L103)

However, there are a lot more operators in Javascript: %, ^, &, >>(>), <<(<), |, &&, ||, ==(=), !=(=), in, ...

And some unary ones: !, ~, ...

@Le0Developer Le0Developer added the bug Something isn't working label Feb 21, 2023
@MichaelXF
Copy link
Owner

Hi, thank you for noticing this. In the next update calculator will be buffed up to include these operators. And unary operators too.

@MichaelXF
Copy link
Owner

Released in 1.6.0

@Le0Developer
Copy link
Author

You sure that the other binary operators are supported?

const allowedBinaryOperators = new Set(["+", "-", "*", "/"]);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants