I need to define a callback, which is to be called by a external library. This callback is called with 1 parameter:
function(item) {};
In my case I need to include a second parameter which I currently solve by using the 'bind' method.
function(item) {
var value = this.value
}.bind({'value': value});
I dont want to write this every time I need to define shuch a callback function. Instead I would like to write something like this:
function(item, value) {};
Which then would be transformed into the bind method in order to satisfy the external library.
Is that possible? Or is there some other way to do this?
Thanks