CoffeeScriptRedux icon indicating copy to clipboard operation
CoffeeScriptRedux copied to clipboard

More function arguments options

Open vinz243 opened this issue 11 years ago • 0 comments

It would be really cool if for example, in addition to this:

func = (foo, bar="bar") ->

We could do for example:

func = (foo [,String bar="bar"], function callback) ->

And it would be translated into:

func = function(foo, bar, callback) {
   if(typeof bar === "function") {
     callback = bar;  
     bar = "bar"
   }
}

And many more other options


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

vinz243 avatar Aug 28 '14 20:08 vinz243