Files
lodash/internal/isPrototype.js
John-David Dalton 0646bacd86 Bump to v4.0.0.
2016-01-12 08:28:18 -08:00

19 lines
487 B
JavaScript

/** Used for built-in method references. */
var objectProto = global.Object.prototype;
/**
* Checks if `value` is likely a prototype object.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
*/
function isPrototype(value) {
var Ctor = value && value.constructor,
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
return value === proto;
}
module.exports = isPrototype;