MCPcopy Index your code
hub / github.com/ionic-team/ionic-framework / testUserAgent

Function testUserAgent

core/src/utils/platform.ts:111–111  ·  view source on GitHub ↗
(win: Window, expr: RegExp)

Source from the content-addressed store, hash-verified

109 !!(win.matchMedia?.('(display-mode: standalone)').matches || (win.navigator as any).standalone);
110
111export const testUserAgent = (win: Window, expr: RegExp) => expr.test(win.navigator.userAgent);
112
113const matchMedia = (win: Window, query: string): boolean => win.matchMedia?.(query).matches;
114

Callers 7

platform.spec.tsFile · 0.90
isIpadFunction · 0.85
isIphoneFunction · 0.85
isIOSFunction · 0.85
isAndroidFunction · 0.85
isAndroidTabletFunction · 0.85
isElectronFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected