export const getDataType = (data) => {
  const type = Object.prototype.toString.call(data)

  let str = ''

  switch (type) {
    case '[object String]':
      str = 'String'
      break
    case '[object Number]':
      str = 'Number'
      break
    case '[object null]':
      str = 'Null'
      break
    case '[object Undefined]':
      str = 'Undefined'
      break
    case '[object Symbol]':
      str = 'Symbol'
      break
    case '[object Object]':
      str = 'Object'
      break
    case '[object Array]':
      str = 'Array'
      break
    case '[object Function]':
      str = 'Function'
      break
    case '[object Date]':
      str = 'Date'
      break
  }
  return str
}
