Created
October 2, 2021 22:11
-
-
Save sayyedhammadali/1a00fd35f98a21b9d01b12b7f96a0b33 to your computer and use it in GitHub Desktop.
Check if the current user is on an Apple device
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 isAppleDevice = /Mac|iPod|iPhone|iPad/.test(navigator.platform); | |
console.log(isAppleDevice); | |
// Result: will return true if user is on an Apple device |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment