MCPcopy Create free account
hub / github.com/SenseUnit/dumbproxy / AddIsResolvableEx

Function AddIsResolvableEx

jsext/addrutil.go:243–251  ·  view source on GitHub ↗
(vm *goja.Runtime)

Source from the content-addressed store, hash-verified

241}
242
243func AddIsResolvableEx(vm *goja.Runtime) error {
244 return vm.GlobalObject().Set("isResolvableEx", func(call goja.FunctionCall) goja.Value {
245 if len(call.Arguments) != 1 {
246 panic(vm.NewTypeError("isResolvableEx expects exactly 1 argument"))
247 }
248 res := dnsResolveEx(call.Argument(0).String())
249 return vm.ToValue(len(res) > 0)
250 })
251}
252
253func AddIsInNetEx(vm *goja.Runtime) error {
254 return vm.GlobalObject().Set("isInNetEx", func(call goja.FunctionCall) goja.Value {

Callers

nothing calls this directly

Calls 3

dnsResolveExFunction · 0.85
SetMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected