chore: split app to commons and web (squash commit)
This commit is contained in:
11
packages/hoppscotch-common/src/helpers/platformutils.ts
Normal file
11
packages/hoppscotch-common/src/helpers/platformutils.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export function isAppleDevice() {
|
||||
return /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)
|
||||
}
|
||||
|
||||
export function getPlatformSpecialKey() {
|
||||
return isAppleDevice() ? "⌘" : "Ctrl"
|
||||
}
|
||||
|
||||
export function getPlatformAlternateKey() {
|
||||
return isAppleDevice() ? "⌥" : "Alt"
|
||||
}
|
||||
Reference in New Issue
Block a user