0

Code inspection for javascript function

Let's say I have a javascript function like this:

function SetActiveOrderPosition(orderId){
     var activeOrder = { };
}

How can I write custom pattern to convert this function to:

SetActiveOrderPosition = function(orderId){
     var activeOrder = { };
}


I need this because I am refactoring global functions into object level functions

2 comments

Please sign in to leave a comment.