isDesktop ( result ) /* check device type is tablet */ DeviceHelper. isMobile ( result ) /* check device type is desktop */ DeviceHelper. detect ( userAgent ) /* check device type (feature phone, smartphone or phablet) */ DeviceHelper. Const DeviceDetector = require ( 'node-device-detector' ) const DeviceHelper = require ( 'node-device-detector/helper' ) const detector = new DeviceDetector const userAgent = 'Mozilla/5.0 (Linux Android 5.0 NX505J Build/KVT49L) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/.78 Mobile Safari/537.36' const result = detector.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |