( winOrPlatform: Window | Platforms | undefined, platform?: Platforms )
| 12 | export const getPlatforms = (win?: any) => setupPlatforms(win); |
| 13 | |
| 14 | export 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 | |
| 25 | export const setupPlatforms = (win: any = window) => { |
| 26 | if (typeof win === 'undefined') { |
no test coverage detected