You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
562 B
21 lines
562 B
2 weeks ago
|
import coreJsData from './_coreJsData.js';
|
||
|
|
||
|
/** 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);
|
||
|
}
|
||
|
|
||
|
export default isMasked;
|