Files
lodash/_isPrototype.js
John-David Dalton 7eeb5ebd61 Bump to v4.5.1.
2016-02-21 21:12:51 -08:00

21 lines
514 B
JavaScript

var isFunction = require('./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;
}
module.exports = isPrototype;