3 var getPrototypeOf = Object.getPrototypeOf, prototype = Object.prototype
4 , toString = prototype.toString
6 , id = Object().toString();
8 module.exports = function (value) {
9 var proto, constructor;
10 if (!value || (typeof value !== 'object') || (toString.call(value) !== id)) {
13 proto = getPrototypeOf(value);
15 constructor = value.constructor;
16 if (typeof constructor !== 'function') return true;
17 return (constructor.prototype !== value);
19 return (proto === prototype) || (getPrototypeOf(proto) === null);