about summary refs log tree commit diff
path: root/src/alf/util/platform.ts
blob: 294e08a8b0213feea5381bd1745e8f2e7617801c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import {isAndroid, isIOS, isNative, isWeb} from 'platform/detection'

export function web(value: any) {
  if (isWeb) {
    return value
  }
}

export function ios(value: any) {
  if (isIOS) {
    return value
  }
}

export function android(value: any) {
  if (isAndroid) {
    return value
  }
}

export function native(value: any) {
  if (isNative) {
    return value
  }
}