ipatalas / vscode-postfix-ts

Postfix notation for TypeScript/Javascript - extension for VS Code
MIT License
158 stars 43 forks source link

Invert boolean expressions when using .not template #7

Closed ipatalas closed 7 years ago

ipatalas commented 7 years ago

x > 3 should become x <= 3 instead of !(x > 3)

The same should apply to complex expressions like a > 1 || b < 100 Currently it will be changed to !(a > 1 || b < 100) which works well but would be more readable if it became a <= 1 && b >= 100

ipatalas commented 7 years ago

See /test/utils.test.ts#L29 for more examples