mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 19:07:49 +00:00
Add baseGetTag helper.
This commit is contained in:
15
lodash.js
15
lodash.js
@@ -2714,6 +2714,17 @@
|
|||||||
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
|
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `getTag`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to query.
|
||||||
|
* @returns {string} Returns the `toStringTag`.
|
||||||
|
*/
|
||||||
|
function baseGetTag(value) {
|
||||||
|
return objectToString.call(value);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The base implementation of `_.gt` which doesn't coerce arguments to numbers.
|
* The base implementation of `_.gt` which doesn't coerce arguments to numbers.
|
||||||
*
|
*
|
||||||
@@ -5485,9 +5496,7 @@
|
|||||||
* @param {*} value The value to query.
|
* @param {*} value The value to query.
|
||||||
* @returns {string} Returns the `toStringTag`.
|
* @returns {string} Returns the `toStringTag`.
|
||||||
*/
|
*/
|
||||||
function getTag(value) {
|
var getTag = baseGetTag;
|
||||||
return objectToString.call(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fallback for data views, maps, sets, and weak maps in IE 11,
|
// Fallback for data views, maps, sets, and weak maps in IE 11,
|
||||||
// for data views in Edge, and promises in Node.js.
|
// for data views in Edge, and promises in Node.js.
|
||||||
|
|||||||
Reference in New Issue
Block a user