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

Function isIpad

core/src/utils/platform.ts:50–62  ·  view source on GitHub ↗
(win: Window)

Source from the content-addressed store, hash-verified

48const isMobileWeb = (win: Window): boolean => isMobile(win) && !isHybrid(win);
49
50const isIpad = (win: Window) => {
51 // iOS 12 and below
52 if (testUserAgent(win, /iPad/i)) {
53 return true;
54 }
55
56 // iOS 13+
57 if (testUserAgent(win, /Macintosh/i) && isMobile(win)) {
58 return true;
59 }
60
61 return false;
62};
63
64const isIphone = (win: Window) => testUserAgent(win, /iPhone/i);
65

Callers 2

isIOSFunction · 0.85
isTabletFunction · 0.85

Calls 2

testUserAgentFunction · 0.85
isMobileFunction · 0.85

Tested by

no test coverage detected