typeObj(obj) { const typeMap = { '[object Array]': 'Array', '[object Object]': 'Object', '[object String]': 'String', '[object Number]': 'Number' } const typeStr = Object.prototype.toString.call(obj); return typeMap[typeStr] || ""; }