UNPKG

868 BSource Map (JSON)View Raw
1{"version":3,"file":"ExpoRandom.js","sourceRoot":"","sources":["../src/ExpoRandom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C;;;GAGG;AACH,SAAS,mBAAmB;IAC1B,IAAI;QACF,OAAO,mBAAmB,CAAC,YAAY,CAAC,CAAC;KAC1C;IAAC,MAAM;QACN,OAAO,aAAa,CAAC,UAAU,CAAC;KACjC;AACH,CAAC;AAED,eAAe,mBAAmB,EAAE,CAAC","sourcesContent":["import { requireNativeModule } from 'expo-modules-core';\nimport { NativeModules } from 'react-native';\n\n/**\n * `expo-random` is an Expo module only on iOS, so we need to catch an error from\n * `requireNativeModule` on Android and fall back to use the original React Native module.\n */\nfunction getExpoRandomModule() {\n try {\n return requireNativeModule('ExpoRandom');\n } catch {\n return NativeModules.ExpoRandom;\n }\n}\n\nexport default getExpoRandomModule();\n"]}
\No newline at end of file