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

Function detectPlatforms

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

Source from the content-addressed store, hash-verified

38};
39
40const detectPlatforms = (win: Window) => {
41 const customPlatformMethods = config.get('platform');
42 return (Object.keys(PLATFORMS_MAP) as Platforms[]).filter((p) => {
43 const customMethod = customPlatformMethods?.[p];
44 return typeof customMethod === 'function' ? customMethod(win) : PLATFORMS_MAP[p](win);
45 });
46};
47
48const isMobileWeb = (win: Window): boolean => isMobile(win) && !isHybrid(win);
49

Callers 1

setupPlatformsFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected