reorder functions for no-use-before-define
This commit is contained in:
+9
-9
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user