mirror of
https://github.com/Wessel/pikmin.git
synced 2026-06-06 11:05:47 +02:00
9 lines
307 B
JavaScript
9 lines
307 B
JavaScript
const getTag = (val) => {
|
|
if (val === null) return val === undefined ? '[object Undefined]' : '[object Null]';
|
|
return toString.call(val);
|
|
};
|
|
|
|
module.exports = (val) => {
|
|
const type = typeof val;
|
|
return type === 'symbol' || (type === 'object' && val !== null && getTag(val) === '[object Symbol]');
|
|
}; |