js 判断传入对象类型

185 阅读1分钟

const isType = (obj, type) => Object.prototype.toString.call(obj).slice(8, -1) === type;