p42ai / js-assistant

120+ refactorings and code-assists for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=p42ai.refactor
MIT License
119 stars 7 forks source link

Refactor Idea: extract functions inside functions #69

Open adminy opened 1 year ago

adminy commented 1 year ago

Looking at the suggestions it says

FunctionName()
This is a big function.
Big functions are harder to understand and change.
You can refactor it, e.g., by extracting some of its logic into new functions.

This function contains lets say 3 other function definitions within itself. These functions in most cases don't even need extra parameters, yet when I highlight the function I don't get an Extract function to module scope. It sounds like a safe procedure that could happen automatically or with a user action.