1 var baseIsNative = require('./_baseIsNative'),
2 isMaskable = require('./_isMaskable');
4 /** Error message constants. */
5 var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.';
8 * Checks if `value` is a pristine native function.
10 * **Note:** This method can't reliably detect native functions in the presence
11 * 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: any
13 * attempt to fix the detection will be obstructed. As a result, we're left
14 * with little choice but to throw an error. Unfortunately, this also affects
15 * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
16 * which rely on core-js.
22 * @param {*} value The value to check.
23 * @returns {boolean} Returns `true` if `value` is a native function,
27 * _.isNative(Array.prototype.push);
33 function isNative(value) {
34 if (isMaskable(value)) {
35 throw new Error(CORE_ERROR_TEXT);
37 return baseIsNative(value);
40 module.exports = isNative;