Files
lodash/_isPrototype.js
John-David Dalton 65e5d998b3 Bump to v4.5.1.
2016-02-21 20:40:07 -08:00

22 lines
544 B
JavaScript

define(['./isFunction'], function(isFunction) {
/** Used for built-in method references. */
var objectProto = 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 = (isFunction(Ctor) && Ctor.prototype) || objectProto;
return value === proto;
}
return isPrototype;
});