reorder functions for no-use-before-define

This commit is contained in:
Girish Ramakrishnan
2026-02-14 16:34:34 +01:00
parent 36aa641cb9
commit e9f96593c3
31 changed files with 2621 additions and 2648 deletions
+9 -9
View File
@@ -8,15 +8,6 @@ function _setMockResolve(fn) {
_mockResolve = fn;
}
function resolveWrapper(hostname, rrtype, options) {
if (_mockResolve) return _mockResolve(hostname, rrtype, options);
return resolve(hostname, rrtype, options);
}
// a note on TXT records. It doesn't have quotes ("") at the DNS level. Those quotes
// are added for DNS server software to enclose spaces. Such quotes may also be returned
// by the DNS REST API of some providers
async function resolve(hostname, rrtype, options) {
assert.strictEqual(typeof hostname, 'string');
assert.strictEqual(typeof rrtype, 'string');
@@ -33,6 +24,15 @@ async function resolve(hostname, rrtype, options) {
return result;
}
// a note on TXT records. It doesn't have quotes ("") at the DNS level. Those quotes
// are added for DNS server software to enclose spaces. Such quotes may also be returned
// by the DNS REST API of some providers
function resolveWrapper(hostname, rrtype, options) {
if (_mockResolve) return _mockResolve(hostname, rrtype, options);
return resolve(hostname, rrtype, options);
}
export default {
resolve: resolveWrapper,
_setMockResolve,