basant307/AI_Governance_Project
045
1import baseIsNative from './_baseIsNative.js';2import isMaskable from './_isMaskable.js';3 4/** Error message constants. */5var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.';6 7/**8 * Checks if `value` is a pristine native function.9 *10 * **Note:** This method can't reliably detect native functions in the presence11 * of the core-js package because core-js circumvents this kind of detection.12 * Despite multiple requests, the core-js maintainer has made it clear: any13 * attempt to fix the detection will be obstructed. As a result, we're left14 * with little choice but to throw an error. Unfortunately, this also affects15 * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),16 * which rely on core-js.17 *18 * @static19 * @memberOf _20 * @since 3.0.021 * @category Lang22 * @param {*} value The value to check.23 * @returns {boolean} Returns `true` if `value` is a native function,24 * else `false`.25 * @example26 *27 * _.isNative(Array.prototype.push);28 * // => true29 *30 * _.isNative(_);31 * // => false32 */33function isNative(value) {34 if (isMaskable(value)) {35 throw new Error(CORE_ERROR_TEXT);36 }37 return baseIsNative(value);38}39 40export default isNative;41 