Returns true if the given value is a constructable function (i.e., a class).
true
This works by wrapping fn in a Proxy, attaching a no-op ProxyHandler.construct trap to it, then attempting to construct the proxy via new.
fn
new
Function to test
Whether the function is constructable
Returns
true
if the given value is a constructable function (i.e., a class).This works by wrapping
fn
in a Proxy, attaching a no-op ProxyHandler.construct trap to it, then attempting to construct the proxy vianew
.