MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / resolve

Function resolve

tools/testmc/main.js:187–197  ·  view source on GitHub ↗
(domain)

Source from the content-addressed store, hash-verified

185 return {ssid: config.ssid, password: config.password};
186 },
187 async resolve(domain) {
188 return new Promise((resolve, reject) => {
189 const Net = Modules.importNow("net");
190 Net.resolve(domain, (name, address) => {
191 if (address)
192 resolve(address);
193 else
194 reject();
195 });
196 });
197 },
198 invalidDomain: "fail.moddable.com",
199};
200Object.freeze(globalThis.$NETWORK);

Callers 9

onChangedFunction · 0.70
connectedFunction · 0.70
runTestFunction · 0.50
finishFunction · 0.50
onWritableMethod · 0.50
onReadableFunction · 0.50
onReadableFunction · 0.50
onReadableFunction · 0.50
onWritableFunction · 0.50

Calls 2

importNowMethod · 0.80
resolveMethod · 0.45

Tested by

no test coverage detected