mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
c55e3649dd
Differential Revision: D3369528 fbshipit-source-id: 0fbc63fbac5e96468598fb3d0a86c6b20f96f39d
29 lines
678 B
JavaScript
29 lines
678 B
JavaScript
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
*
|
|
* @providesModule Platform
|
|
* @flow
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
const Platform = {
|
|
OS: 'android',
|
|
get Version() { return require('NativeModules').AndroidConstants.Version; },
|
|
select: (obj: Object) => obj.android,
|
|
lazySelect(obj: ?Object): ?Object {
|
|
if (!obj || !obj.android) {
|
|
return null;
|
|
}
|
|
|
|
return obj.android();
|
|
},
|
|
};
|
|
|
|
module.exports = Platform;
|