Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js check if function is a constructor

function isConstructor(func) {
    return (func && typeof func === "function" && func.prototype && func.prototype.constructor) === func;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #check #function #constructor
ADD COMMENT
Topic
Name
2+9 =