factorx Package adding smart refactoring functionalities for your JavaScript code. Demo Extract Variable