// 验证是否为blob格式
import Vue from 'vue'

export async function blobValidate (data) {
  try {
    const text = await data.text()
    JSON.parse(text)
    return false
  } catch (error) {
    return true
  }
}

export function isDebugUser () {
  const store = Vue.$store
  const currUser = store.state.account?.user
  return currUser && (currUser.name === '1' || currUser.rolesnames?.indexOf('运维人员') > -1)
}
