Last change
on this file since 84d0fbb was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
480 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | /** Used for built-in method references. */
|
---|
| 2 | var objectProto = Object.prototype;
|
---|
| 3 |
|
---|
| 4 | /**
|
---|
| 5 | * Checks if `value` is likely a prototype object.
|
---|
| 6 | *
|
---|
| 7 | * @private
|
---|
| 8 | * @param {*} value The value to check.
|
---|
| 9 | * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
---|
| 10 | */
|
---|
| 11 | function isPrototype(value) {
|
---|
| 12 | var Ctor = value && value.constructor,
|
---|
| 13 | proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
|
---|
| 14 |
|
---|
| 15 | return value === proto;
|
---|
| 16 | }
|
---|
| 17 |
|
---|
| 18 | module.exports = isPrototype;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.