More javascript refactor
I believe IDEA's javascript plugin is out of comparison with other IDEs from many perspectives, but right now there's really very few facting patterns available for javascript codes ( despite the existence of quite complete AST ), I guess you're already planning some in the dev , I just share a wish list here:
- Transform between function declarition and function assigment:
function refactor(){} <-> var refactor = function(){};
- Moving function ( as object definition ):
function refactor(){}
//OR
var refactor = function(){};
->
obj = {
refactor : function(){}
};- Moving function ( as object assignment ):
function refactor(){} //OR var refactor = function(){}; -> obj.refactor = function(){};
- Moving closure ( change scope ):
-
function outter() { var private; function inner() { private; } inner(); } -> function inner( private ) { private; }
function outter() { var private; var private( private ); }
-
Please sign in to leave a comment.