_isMasked.js (564B)
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;