菜单

ABlog

Github
文章漫游 切换到深色模式 切换到浅色模式
/**
 * 获得数据类型
 * @param {*} target
 * @param {boolean} [lowerCase=true] 控制是否转为小写
 * @returns {string}
 */
function getType(target, lowerCase = true) {
  const t = Object.prototype.toString
    .call(target)
    .replace(/\[object (\w+)\]/, "$1");
  return lowerCase ? t.toLowerCase() : t;
}