Search code examples
javascriptwebstorm

Rewrite JavaScript function signature in WebStorm


I've googled this with no success, and I can't find an answer in the docs. In WebStorm how can I refactor the definition of a function to be assigned to a variable eg:

function foo(args) {

}

becomes

var foo = function(args) {

}

Solution

  • There is no intention in current WebStorm versions for such transformation.

    https://youtrack.jetbrains.com/issue/WEB-12768 -- watch this ticket (star/vote/comment) to get notified on any progress.