Calling toString on function proxy throws TypeError exception

Claude Pache claude.pache at gmail.com
Fri Oct 23 13:43:40 UTC 2015


Almost every method found on `Function.prototype` "works" (or, at least, does not throw a TypeError before trying to work) if and only if the target is callable, or if and only if `typeof` applied to the target produces `"function"`. 
That should not be different for `Function.prototype.toString()`. Even if "working" means producing a useless string à la `"function () { [native code] }"`.

—Claude



More information about the es-discuss mailing list