Download src/lib/utils/platform.ts from huggingface/inference-playground: direct link, hf CLI and curl.
- Browser
- Download file 191 Bytes
-
https://huggingface.co/spaces/huggingface/inference-playground/resolve/refs%2Fpr%2F13/src/lib/utils/platform.ts
- Command line
-
hf download hf://spaces/huggingface/inference-playground@refs/pr/13/src/lib/utils/platform.ts
-
curl -L -o platform.ts https://huggingface.co/spaces/huggingface/inference-playground/resolve/refs%2Fpr%2F13/src/lib/utils/platform.ts
191 Bytes
| export function isMac() { | |
| return navigator.platform.toUpperCase().indexOf("MAC") >= 0; | |
| } | |
| export const cmdOrCtrl = isMac() ? "⌘" : "Ctrl"; | |
| export const optOrAlt = isMac() ? "⌥" : "Alt"; | |