UNPKG

521 BJavaScriptView Raw
1import { requireNativeModule } from 'expo-modules-core';
2import { NativeModules } from 'react-native';
3/**
4 * `expo-random` is an Expo module only on iOS, so we need to catch an error from
5 * `requireNativeModule` on Android and fall back to use the original React Native module.
6 */
7function getExpoRandomModule() {
8 try {
9 return requireNativeModule('ExpoRandom');
10 }
11 catch {
12 return NativeModules.ExpoRandom;
13 }
14}
15export default getExpoRandomModule();
16//# sourceMappingURL=ExpoRandom.js.map
\No newline at end of file