mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 01:47:48 +00:00
Create more error text constants.
This commit is contained in:
11
lodash.js
11
lodash.js
@@ -17,8 +17,11 @@
|
|||||||
/** Used as the size to enable large array optimizations. */
|
/** Used as the size to enable large array optimizations. */
|
||||||
var LARGE_ARRAY_SIZE = 200;
|
var LARGE_ARRAY_SIZE = 200;
|
||||||
|
|
||||||
/** Used as the `TypeError` message for "Functions" methods. */
|
/** Error message constants. */
|
||||||
var FUNC_ERROR_TEXT = 'Expected a function';
|
var TRY_ES_SHIMS = 'Try https://github.com/es-shims.',
|
||||||
|
CORE_ERROR_TEXT = 'Unsupported core-js use. ' + TRY_ES_SHIMS,
|
||||||
|
FUNC_ERROR_TEXT = 'Expected a function',
|
||||||
|
SHIM_ERROR_TEXT = 'Unsupported method. ' + TRY_ES_SHIMS;
|
||||||
|
|
||||||
/** Used to stand-in for `undefined` hash values. */
|
/** Used to stand-in for `undefined` hash values. */
|
||||||
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
||||||
@@ -11145,7 +11148,7 @@
|
|||||||
* // => false
|
* // => false
|
||||||
*/
|
*/
|
||||||
var isArray = Array.isArray || (Array.isArray = function() {
|
var isArray = Array.isArray || (Array.isArray = function() {
|
||||||
throw new Error('This method is not supported. Try https://github.com/es-shims.');
|
throw new Error(SHIM_ERROR_TEXT);
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -11780,7 +11783,7 @@
|
|||||||
*/
|
*/
|
||||||
function isNative(value) {
|
function isNative(value) {
|
||||||
if (isMaskable(value)) {
|
if (isMaskable(value)) {
|
||||||
throw new Error('This method is not supported with core-js. Try https://github.com/es-shims.');
|
throw new Error(CORE_ERROR_TEXT);
|
||||||
}
|
}
|
||||||
return baseIsNative(value);
|
return baseIsNative(value);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user