SPB Git

Repository Public

haptic.ts 297 B 9 lines typescript

1/** Light haptic tick where the platform supports it (no-op on iOS Safari; harmless everywhere). */2export function haptic(ms: number | number[] = 8): void {3  try {4    if (typeof navigator !== 'undefined' && 'vibrate' in navigator) navigator.vibrate(ms);5  } catch {6    /* unsupported */7  }8}9
Files main
Menu

Theme