Allow query to not be case sensitive
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
Signed-off-by: Sam Therapy <sam@samtherapy.net>
This commit is contained in:
parent
a29f69fce7
commit
19aac80ce7
2 changed files with 5 additions and 4 deletions
3
args.ts
3
args.ts
|
@ -1,3 +1,4 @@
|
|||
|
||||
import { Args } from "./deps.ts";
|
||||
import { isRecordType, ServerOptions } from "./lib/utils.ts";
|
||||
/**
|
||||
|
@ -36,7 +37,7 @@ export function parseArgs(args: Args): arguments {
|
|||
}
|
||||
|
||||
if (isRecordType(arg)) {
|
||||
parsed.type = arg;
|
||||
parsed.type = arg.toUpperCase() as Deno.RecordType;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,9 +24,9 @@ export type ServerOptions = {
|
|||
};
|
||||
|
||||
export function isRecordType(type: string): type is Deno.RecordType {
|
||||
return type === "A" || type === "AAAA" || type === "CNAME" || type === "MX" ||
|
||||
type === "NS" || type === "PTR" || type === "SOA" || type === "TXT" ||
|
||||
type === "NAPTR" || type === "SRV";
|
||||
return type.toUpperCase() === "A" || type.toUpperCase() === "AAAA" || type.toUpperCase() === "CNAME" || type.toUpperCase() === "MX" ||
|
||||
type.toUpperCase() === "NS" || type.toUpperCase() === "PTR" || type.toUpperCase() === "SOA" || type.toUpperCase() === "TXT" ||
|
||||
type.toUpperCase() === "NAPTR" || type.toUpperCase() === "SRV" || type.toUpperCase() === "CAA";
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue