Determine if a JavaScript function is a bound function
Both bound functions and arrow functions do not have a prototype property: typeof (function() {}).prototype // ‘object’ as usual typeof (function() {}).bind(null).prototype // ‘undefined’! typeof (() => {}).prototype // ‘undefined’! This is not 100% safe since you could still manually assign this property (although that’d be weird). As such, a simple way to check for … Read more