repoweaver
Version:
A GitHub App that skillfully weaves multiple templates together to create and update repositories with intelligent merge strategies
1 lines • 2.29 kB
JSON
{"ast":null,"code":"export function requireNativeModule(moduleName) {\n const nativeModule = requireOptionalNativeModule(moduleName);\n if (nativeModule != null) {\n return nativeModule;\n }\n if (typeof window === 'undefined') {\n return {};\n }\n throw new Error(`Cannot find native module '${moduleName}'`);\n}\nexport function requireOptionalNativeModule(moduleName) {\n if (typeof globalThis.ExpoDomWebView === 'object' && globalThis?.expo?.modules != null) {\n return globalThis.expo?.modules?.[moduleName] ?? null;\n }\n return null;\n}","map":{"version":3,"names":["requireNativeModule","moduleName","nativeModule","requireOptionalNativeModule","window","Error","globalThis","ExpoDomWebView","expo","modules"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/expo-modules-core/src/requireNativeModule.web.ts"],"sourcesContent":["export function requireNativeModule<ModuleType = any>(moduleName: string): ModuleType {\n const nativeModule = requireOptionalNativeModule<ModuleType>(moduleName);\n if (nativeModule != null) {\n return nativeModule;\n }\n if (typeof window === 'undefined') {\n // For SSR, we expect not to have native modules available, but to avoid crashing from SSR resolutions, we return an empty object.\n return {} as ModuleType;\n }\n throw new Error(`Cannot find native module '${moduleName}'`);\n}\n\nexport function requireOptionalNativeModule<ModuleType = any>(\n moduleName: string\n): ModuleType | null {\n if (typeof globalThis.ExpoDomWebView === 'object' && globalThis?.expo?.modules != null) {\n return globalThis.expo?.modules?.[moduleName] ?? null;\n }\n return null;\n}\n"],"mappings":"AAAA,OAAO,SAASA,mBAAmBA,CAAmBC,UAAkB,EAAc;EACpF,MAAMC,YAAY,GAAGC,2BAA2B,CAAaF,UAAU,CAAC;EACxE,IAAIC,YAAY,IAAI,IAAI,EAAE;IACxB,OAAOA,YAAY;EACrB;EACA,IAAI,OAAOE,MAAM,KAAK,WAAW,EAAE;IAEjC,OAAO,CAAC,CAAC;EACX;EACA,MAAM,IAAIC,KAAK,CAAC,8BAA8BJ,UAAU,GAAG,CAAC;AAC9D;AAEA,OAAO,SAASE,2BAA2BA,CACzCF,UAAkB,EACC;EACnB,IAAI,OAAOK,UAAU,CAACC,cAAc,KAAK,QAAQ,IAAID,UAAU,EAAEE,IAAI,EAAEC,OAAO,IAAI,IAAI,EAAE;IACtF,OAAOH,UAAU,CAACE,IAAI,EAAEC,OAAO,GAAGR,UAAU,CAAC,IAAI,IAAI;EACvD;EACA,OAAO,IAAI;AACb","ignoreList":[]},"metadata":{"hasCjsExports":false},"sourceType":"module","externalDependencies":[]}