Is there an elegant way to tell Harmony\'s slim arrow functions apart from regular functions and built-in functions?
The Harmony wiki states that:>
Arrow function of JavaScript does not have prototype property.
prototype
function isArrowFunc(fn){ return typeof(fn)=="function" && fn.prototype === undefined && !(/\{\s*\[native code\]\s*\}/).test(fn.toString()); } isArrowFunc(()=>{}) // true isArrowFunc(function(){}) // false isArrowFunc(123) // false