I want to find all if and if's condition For example: For this code:
if (bla === 3) {
}
if ((((ol === 1 || (true))))) {}
if ((1 === 4)
(this === 9)) {}
I want to get:
if (bla === 3)
if ((((ol === 1 || (true)))))
if ((1 === 4)
(this === 9))
I can make regex that find if, but my method have a problems: wrong work with a brakets(return "if ((some == some)", unclosed braket) or exits if and select unnecessary code.