elk/composables/os.ts

4 wiersze
172 B
TypeScript

export const useIsMac = () => computed(() =>
useRequestHeaders(['user-agent'])['user-agent']?.includes('Macintosh')
?? navigator?.platform?.includes('Mac') ?? false)