mirror of
https://github.com/swc-project/swc.git
synced 2024-12-20 20:22:26 +03:00
bbaf619f63
swc_bundler: - [x] Fix wrapped esms. (denoland/deno#9307) - [x] Make test secure.
21 lines
464 B
TypeScript
21 lines
464 B
TypeScript
// Loaded from https://raw.githubusercontent.com/lodash/lodash/master/.internal/getTag.js
|
|
|
|
|
|
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
|