elk/composables/os.ts

4 lines
172 B
TypeScript
Raw Permalink Normal View History

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