Is it possible to make an object callable by implementing either call or apply on it, or in some other way? E.g.:
call
apply
var obj = {}; obj
Following the same line of @Max, but using ES6 extensions to Object to pass all properties and prototype of an object obj to the callable func.
Object
obj
func
Object.assign(func, obj); Object.setPrototypeOf(func, Object.getPrototypeOf(obj));