reactotron-react-native
Version:
A development tool to explore, inspect, and diagnose your React Native apps.
40 lines (39 loc) • 1.08 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = getReactNativePlatformConstants;
var _reactNative = require("react-native");
function getReactNativePlatformConstants() {
const defaults = {
osRelease: "",
model: "",
serverHost: "",
uiMode: "",
serial: "",
forceTouch: false,
interfaceIdiom: "",
systemName: ""
};
if (_reactNative.Platform.OS === "android") {
const constants = _reactNative.Platform.constants;
return {
...defaults,
osRelease: constants.Release,
model: constants.Model,
serverHost: constants.ServerHost,
uiMode: constants.uiMode,
serial: constants.Serial
};
} else if (_reactNative.Platform.OS === "ios") {
const constants = _reactNative.Platform.constants;
return {
...defaults,
forceTouch: constants.forceTouchAvailable || false,
interfaceIdiom: constants.interfaceIdiom,
systemName: constants.systemName
};
}
return defaults;
}
//# sourceMappingURL=getReactNativePlatformConstants.js.map