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

Function isPlatform

core/src/utils/platform.ts:14–23  ·  view source on GitHub ↗
(
  winOrPlatform: Window | Platforms | undefined,
  platform?: Platforms
)

Source from the content-addressed store, hash-verified

12export const getPlatforms = (win?: any) => setupPlatforms(win);
13
14export const isPlatform: IsPlatformSignature = (
15 winOrPlatform: Window | Platforms | undefined,
16 platform?: Platforms
17) => {
18 if (typeof winOrPlatform === 'string') {
19 platform = winOrPlatform;
20 winOrPlatform = undefined;
21 }
22 return getPlatforms(winOrPlatform).includes(platform!);
23};
24
25export const setupPlatforms = (win: any = window) => {
26 if (typeof win === 'undefined') {

Callers 10

PickerColumnClass · 0.90
beforeAnimationMethod · 0.90
afterAnimationMethod · 0.90
componentDidLoadMethod · 0.90
needInputShimsFunction · 0.90
shouldForceOverscrollMethod · 0.90
renderMethod · 0.90
ToggleClass · 0.90
platform.spec.tsFile · 0.90
initializeFunction · 0.90

Calls 1

getPlatformsFunction · 0.70

Tested by

no test coverage detected