I have a function that accepts a callback and bind this
to it. I want to throw an error if the function is called with an arrow function as callback (because I cannot bind this
to arrow functions).
Something like:
doSomethingWithMyCallback(function(){}); // ok
doSomethingWithMyCallback(() => {}); // should throw an error
How can I check if the callback is not an arrow function (i.e. I can bind this
to it)?