mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 16:17:50 +00:00
18 lines
372 B
JavaScript
18 lines
372 B
JavaScript
const toString = Object.prototype.toString
|
|
|
|
/**
|
|
* Gets the `toStringTag` of `value`.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to query.
|
|
* @returns {string} Returns the `toStringTag`.
|
|
*/
|
|
function getTag(value) {
|
|
if (value == null) {
|
|
return value === undefined ? '[object Undefined]' : '[object Null]'
|
|
}
|
|
return toString.call(value)
|
|
}
|
|
|
|
export default getTag
|