Last active
October 22, 2022 19:49
-
-
Save oguzhancvdr/3578812ec8422a9d4fff3204af5d3844 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const judgeDeviceType = | |
() => /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|OperaMini/i.test(navigator.userAgent) ? 'Mobile' : 'PC'; | |
judgeDeviceType() | |
// PC | Mobile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Check device type