DEV Community

Discussion on: JS Refactoring Combo: Simplify Duplicated Function Call Inside If-Else Statement

Collapse
 
paratron profile image
Christian Engel

I am not sure about this. The example would be a situation where I explicitly NOT use any tool for the task, since just typing it manually is so much less work.

Are there complicated examples, where a tool like this actually HELPS instead of wasting time?

Collapse
 
lgrammel profile image
Lars Grammel P42

As mentioned in the other comment, manual re-typing is 2x as fast. The advantage of using a tool is to prevent mistakes, e.g. when you think you could refactor some code, but missed a small difference and as a result introduced a regression.