Last change
on this file since 188ee53 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
564 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | var coreJsData = require('./_coreJsData');
|
---|
| 2 |
|
---|
| 3 | /** Used to detect methods masquerading as native. */
|
---|
| 4 | var maskSrcKey = (function() {
|
---|
| 5 | var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
|
---|
| 6 | return uid ? ('Symbol(src)_1.' + uid) : '';
|
---|
| 7 | }());
|
---|
| 8 |
|
---|
| 9 | /**
|
---|
| 10 | * Checks if `func` has its source masked.
|
---|
| 11 | *
|
---|
| 12 | * @private
|
---|
| 13 | * @param {Function} func The function to check.
|
---|
| 14 | * @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
---|
| 15 | */
|
---|
| 16 | function isMasked(func) {
|
---|
| 17 | return !!maskSrcKey && (maskSrcKey in func);
|
---|
| 18 | }
|
---|
| 19 |
|
---|
| 20 | module.exports = isMasked;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.