about summary refs log tree commit diff
path: root/src/alf/util/platform.ts
blob: 544f5480b6467f0fdc30ab7f4f1285d8a04cac86 (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 {Platform} from 'react-native'

export function web(value: any) {
  return Platform.select({
    web: value,
  })
}

export function ios(value: any) {
  return Platform.select({
    ios: value,
  })
}

export function android(value: any) {
  return Platform.select({
    android: value,
  })
}

export function native(value: any) {
  return Platform.select({
    native: value,
  })
}