获取数据类型

const getValueType = (value) => {
    const originType =  Object.prototype.toString.call(value)
    const spaceIndex = originType.indexOf(' ')
    return originType.slice(spaceIndex + 1, -1).toLowerCase()
}

  

posted @ 2023-02-02 13:10  671_MrSix  阅读(7)  评论(0编辑  收藏  举报