mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-12-28 10:09:09 +00:00
21 lines
564 B
JavaScript
21 lines
564 B
JavaScript
|
var coreJsData = require('./_coreJsData');
|
||
|
|
||
|
/** Used to detect methods masquerading as native. */
|
||
|
var maskSrcKey = (function() {
|
||
|
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
|
||
|
return uid ? ('Symbol(src)_1.' + uid) : '';
|
||
|
}());
|
||
|
|
||
|
/**
|
||
|
* Checks if `func` has its source masked.
|
||
|
*
|
||
|
* @private
|
||
|
* @param {Function} func The function to check.
|
||
|
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
||
|
*/
|
||
|
function isMasked(func) {
|
||
|
return !!maskSrcKey && (maskSrcKey in func);
|
||
|
}
|
||
|
|
||
|
module.exports = isMasked;
|