https://github.com/ovidijusparsiunas/condition-inverter
Invert conditions for all modern programming languages and frameworks :twisted_rightwards_arrows:
https://github.com/ovidijusparsiunas/condition-inverter
condition conditional-statement conditions else else-if framework-agnostic if if-else if-statement inversion invert inverter language-agnostic logical reverser statement vscode-extension
Last synced: 4 months ago
JSON representation
Invert conditions for all modern programming languages and frameworks :twisted_rightwards_arrows:
- Host: GitHub
- URL: https://github.com/ovidijusparsiunas/condition-inverter
- Owner: OvidijusParsiunas
- License: mit
- Created: 2022-03-03T19:38:23.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-24T14:13:29.000Z (over 1 year ago)
- Last Synced: 2025-06-22T11:03:11.472Z (4 months ago)
- Topics: condition, conditional-statement, conditions, else, else-if, framework-agnostic, if, if-else, if-statement, inversion, invert, inverter, language-agnostic, logical, reverser, statement, vscode-extension
- Language: TypeScript
- Homepage: http://conditioninverter.com
- Size: 30 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Description
A simple tool used to invert conditions for all modern programming languages and frameworks! It can be used to invert if statements, ternary operators, conditional assignments and much more - in both standard code files and html templates!
## Platforms
Website - [conditioninverter.com](http://conditioninverter.com/), [Github](https://github.com/OvidijusParsiunas/condition-inverter/tree/main/website)
VS Code Extension - [Marketplace](https://marketplace.visualstudio.com/items?itemName=OvidijusParsiunas.condition-inverter), [Github](https://github.com/OvidijusParsiunas/condition-inverter/blob/main/extension)
## Theory
This tool takes an input condition, analyzes it and produces a new condition that yields an absolute opposite result. This is illustrated by the following example:
| Properties | Original condition | Result | Inverted condition | Result |
| :--- | :--- | :---- | :---- | :---- |
| dog = true, cat = false | dog && cat | false | !dog | | !cat | true |
| dog = 3, cat = 2 | dog < cat | false | dog >= cat | true |
## Language Support
Condition Inverter supports all *modern* progrogramming languages and frameworks. This includes technologies that have been ranked as the most popular on the [Stack Overflow Developer Survey](https://survey.stackoverflow.co/2022/#technology-most-popular-technologies).
Disclaimer - this tool does not currently support query, shell scripting or assembly based languages.
## Contributions
Open source is built by the community for the community. All contributions to this project are welcome!
Additionally, if you have any suggestions for enhancements, ideas on how to take the project further or have discovered a bug, do not hesitate to create a new issue ticket and we will look into it as soon as possible!