How to install ?
npm i @hehaonan/device-detection
How to use this useless package ?
There is a function called getDeviceType
,which is attached to a object called device_detection
. So you can use it as
device_detection.getDeviceType() //in browser
import { getDeviceType } from '@hehaonan/device-detection' // ES module