Custom tool for os info.
npm i js-os-info
1. import osInfo from 'js-os-info'
2. // test OS info
osInfo.update()
3. if(osInfo.isSurface){
console.log('it is surface')
}
os
browser
onLine
language
canvasAble
file
fileSystem
webgl
worker
cookieEnabled
msPointerable
touchable
maxTouchPoints
isSurface
localStorage
requestAnimationFrameAble
update: 更新检测
isPC:
getBrowser