Add baseGetTag helper.

This commit is contained in:
John-David Dalton
2016-05-26 08:59:01 -07:00
parent 1740ee91da
commit a43065ec08

View File

@@ -2714,6 +2714,17 @@
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.
*
@@ -5485,9 +5496,7 @@
* @param {*} value The value to query.
* @returns {string} Returns the `toStringTag`.
*/
function getTag(value) {
return objectToString.call(value);
}
var getTag = baseGetTag;
// Fallback for data views, maps, sets, and weak maps in IE 11,
// for data views in Edge, and promises in Node.js.