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

Method constructor

modules/network/dns/dnsresolverudp.js:138–150  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

136
137class Resolver {
138 constructor(options) {
139 manager ??= new Manager;
140
141 manager.add({
142 request: this,
143 host: options.host.toString(),
144 onResolved: options.onResolved,
145 onError: options.onError,
146 });
147
148 if (options.target)
149 this.target = options.target;
150 }
151 close() {
152 manager?.remove(this);
153 }

Callers

nothing calls this directly

Calls 2

addMethod · 0.65
toStringMethod · 0.45

Tested by

no test coverage detected