UNPKG

repoweaver

Version:

A GitHub App that skillfully weaves multiple templates together to create and update repositories with intelligent merge strategies

1 lines 1.94 kB
{"ast":null,"code":"export function getBundleUrl() {\n let scriptURL = null;\n if (typeof window === 'undefined') {\n scriptURL = 'file://' + __filename;\n } else {\n scriptURL = document.currentScript?.src;\n }\n if (scriptURL == null) {\n return null;\n }\n const url = new URL(scriptURL);\n return `${url.protocol}//${url.host}${url.pathname}`;\n}","map":{"version":3,"names":["getBundleUrl","scriptURL","window","__filename","document","currentScript","src","url","URL","protocol","host","pathname"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/expo/src/utils/getBundleUrl.web.ts"],"sourcesContent":["// Copyright 2015-present 650 Industries. All rights reserved.\n\nexport function getBundleUrl(): string | null {\n let scriptURL: string | null | undefined = null;\n\n if (typeof window === 'undefined') {\n // For server runtime, we use the filename of the current script\n // @ts-ignore The react-native tsconfig doesn't support CJS\n scriptURL = 'file://' + __filename;\n } else {\n // TODO: Try to support `import.meta.url` when the ecosystem supports ESM,\n // and jest doesn't throw SyntaxError when accessing `import.meta`.\n scriptURL = (document.currentScript as HTMLScriptElement)?.src;\n }\n\n if (scriptURL == null) {\n return null;\n }\n const url = new URL(scriptURL);\n return `${url.protocol}//${url.host}${url.pathname}`;\n}\n"],"mappings":"AAEA,OAAO,SAASA,YAAYA,CAAA,EAAkB;EAC5C,IAAIC,SAAoC,GAAG,IAAI;EAE/C,IAAI,OAAOC,MAAM,KAAK,WAAW,EAAE;IAGjCD,SAAS,GAAG,SAAS,GAAGE,UAAU;EACpC,CAAC,MAAM;IAGLF,SAAS,GAAIG,QAAQ,CAACC,aAAa,EAAwBC,GAAG;EAChE;EAEA,IAAIL,SAAS,IAAI,IAAI,EAAE;IACrB,OAAO,IAAI;EACb;EACA,MAAMM,GAAG,GAAG,IAAIC,GAAG,CAACP,SAAS,CAAC;EAC9B,OAAO,GAAGM,GAAG,CAACE,QAAQ,KAAKF,GAAG,CAACG,IAAI,GAAGH,GAAG,CAACI,QAAQ,EAAE;AACtD","ignoreList":[]},"metadata":{"hasCjsExports":false},"sourceType":"module","externalDependencies":[]}