MCPcopy Create free account
hub / github.com/ptmt/react-native-macos / getDevServerURL

Function getDevServerURL

Libraries/Image/resolveAssetSource.js:24–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22let _customSourceTransformer, _serverURL, _bundleSourcePath;
23
24function getDevServerURL(): ?string {
25 if (_serverURL === undefined) {
26 var scriptURL = NativeModules.SourceCode.scriptURL;
27 var match = scriptURL && scriptURL.match(/^https?:\/\/.*?\//);
28 if (match) {
29 // Bundle was loaded from network
30 _serverURL = match[0];
31 } else {
32 // Bundle was loaded from file
33 _serverURL = null;
34 }
35 }
36 return _serverURL;
37}
38
39function getBundleSourcePath(): ?string {
40 if (_bundleSourcePath === undefined) {

Callers 1

resolveAssetSourceFunction · 0.85

Calls 1

matchMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…