import UAParser from "ua-parser-js";

const ua = new UAParser();

function printUA() {
  const { name, version } = ua.getBrowser();
  console.log(`浏览器名称：${name}   浏览器版本：${version}`);

  console.log(ua.getEngine(), ua.getDevice(), ua.getCPU(), ua.getOS());
}

printUA();

export default function () {
  const { name, version } = ua.getBrowser();
  console.log(parseInt(version || "", 10));
  // 满足要求的浏览器
  return name === "Blink" && parseInt(version || "", 10) >= 80;
}
