We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 344b32b commit daa79b0Copy full SHA for daa79b0
Libraries/Utilities/Platform.web.js
@@ -0,0 +1,24 @@
1
+/**
2
+ * Copyright (c) 2015-present, Facebook, Inc.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
7
+ * @format
8
+ * @flow
9
+ */
10
+
11
+'use strict';
12
13
+export type PlatformSelectSpec<D, I> = {
14
+ default?: D,
15
+ web?: I,
16
+};
17
18
+const Platform = {
19
+ OS: 'web',
20
+ select: <D, I>(spec: PlatformSelectSpec<D, I>): D | I =>
21
+ 'web' in spec ? spec.web : spec.default,
22
23
24
+module.exports = Platform;
0 commit comments