main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
725 bytes
|
Rev | Line | |
---|
[79a0317] | 1 | 'use strict';
|
---|
| 2 | var DESCRIPTORS = require('../internals/descriptors');
|
---|
| 3 | var hasOwn = require('../internals/has-own-property');
|
---|
| 4 |
|
---|
| 5 | var FunctionPrototype = Function.prototype;
|
---|
| 6 | // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
---|
| 7 | var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;
|
---|
| 8 |
|
---|
| 9 | var EXISTS = hasOwn(FunctionPrototype, 'name');
|
---|
| 10 | // additional protection from minified / mangled / dropped function names
|
---|
| 11 | var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
---|
| 12 | var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));
|
---|
| 13 |
|
---|
| 14 | module.exports = {
|
---|
| 15 | EXISTS: EXISTS,
|
---|
| 16 | PROPER: PROPER,
|
---|
| 17 | CONFIGURABLE: CONFIGURABLE
|
---|
| 18 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.