mirror of
https://github.com/oven-sh/bun
synced 2026-02-14 04:49:06 +00:00
feat(node:dns): implement dns.reverse. (#4332)
* feat(node:dns): implement `dns.reverse`. Close: #4299 * fix dns reverse for ipv6 --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
This commit is contained in:
@@ -214,6 +214,7 @@ extern "C" EncodedJSValue Bun__DNSResolver__resolveNs(JSGlobalObject*, JSC::Call
|
||||
extern "C" EncodedJSValue Bun__DNSResolver__resolvePtr(JSGlobalObject*, JSC::CallFrame*);
|
||||
extern "C" EncodedJSValue Bun__DNSResolver__resolveCname(JSGlobalObject*, JSC::CallFrame*);
|
||||
extern "C" EncodedJSValue Bun__DNSResolver__getServers(JSGlobalObject*, JSC::CallFrame*);
|
||||
extern "C" EncodedJSValue Bun__DNSResolver__reverse(JSGlobalObject*, JSC::CallFrame*);
|
||||
|
||||
static JSValue constructDNSObject(VM& vm, JSObject* bunObject)
|
||||
{
|
||||
@@ -243,6 +244,8 @@ static JSValue constructDNSObject(VM& vm, JSObject* bunObject)
|
||||
JSC::PropertyAttribute::Function | JSC::PropertyAttribute::DontDelete | 0);
|
||||
dnsObject->putDirectNativeFunction(vm, globalObject, JSC::Identifier::fromString(vm, "getServers"_s), 2, Bun__DNSResolver__getServers, ImplementationVisibility::Public, NoIntrinsic,
|
||||
JSC::PropertyAttribute::Function | JSC::PropertyAttribute::DontDelete | 0);
|
||||
dnsObject->putDirectNativeFunction(vm, globalObject, JSC::Identifier::fromString(vm, "reverse"_s), 2, Bun__DNSResolver__reverse, ImplementationVisibility::Public, NoIntrinsic,
|
||||
JSC::PropertyAttribute::Function | JSC::PropertyAttribute::DontDelete | 0);
|
||||
return dnsObject;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user