mirror of
https://github.com/jakejarvis/rdapper.git
synced 2026-09-23 01:25:31 -04:00
Implement domain lookup in index.ts: consolidate RDAP and WHOIS logic into a single function, add availability checks, and enhance type definitions. Remove deprecated lookup.ts and introduce smoke tests for comprehensive coverage of lookup scenarios.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { toISO } from "../lib/dates.js";
|
||||
import { isWhoisAvailable } from "../lib/domain.js";
|
||||
import { parseKeyValueLines, uniq } from "../lib/text.js";
|
||||
import type {
|
||||
Contact,
|
||||
@@ -131,6 +132,7 @@ export function normalizeWhois(
|
||||
const record: DomainRecord = {
|
||||
domain,
|
||||
tld,
|
||||
isRegistered: !isWhoisAvailable(whoisText),
|
||||
isIDN: /(^|\.)xn--/i.test(domain),
|
||||
unicodeName: undefined,
|
||||
punycodeName: undefined,
|
||||
|
||||
Reference in New Issue
Block a user