@cleandns/whois-rdap 1.0.18 → 1.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/src/index.ts +2 -2
- package/whois.d.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -10,7 +10,7 @@ const eventMap = new Map([
|
|
|
10
10
|
["expiration", "expires"],
|
|
11
11
|
["expiration date", "expires"],
|
|
12
12
|
]);
|
|
13
|
-
export async function whois(origDomain, options = { fetch: fetch }) {
|
|
13
|
+
export async function whois(origDomain, options = { fetch: fetch, thinOnly: false }) {
|
|
14
14
|
var _a, _b, _c, _d, _e, _f;
|
|
15
15
|
const fetch = options.fetch;
|
|
16
16
|
let domain = origDomain;
|
|
@@ -48,7 +48,7 @@ export async function whois(origDomain, options = { fetch: fetch }) {
|
|
|
48
48
|
link.rel === "related" &&
|
|
49
49
|
link.type === "application/rdap+json")) === null || _d === void 0 ? void 0 : _d.href.replace("/domain/domain/", "/domain/");
|
|
50
50
|
let thickResponse = null;
|
|
51
|
-
if (thickRdap) {
|
|
51
|
+
if (!options.thinOnly && thickRdap) {
|
|
52
52
|
// console.log(`fetching thick RDAP: ${thickRdap}`);
|
|
53
53
|
thickResponse = await fetch(thickRdap)
|
|
54
54
|
.then((r) => r.json())
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -15,7 +15,7 @@ const eventMap = new Map<string, WhoisTimestampFields>([
|
|
|
15
15
|
|
|
16
16
|
export async function whois(
|
|
17
17
|
origDomain: string,
|
|
18
|
-
options: WhoisOptions = { fetch: fetch }
|
|
18
|
+
options: WhoisOptions = { fetch: fetch, thinOnly: false }
|
|
19
19
|
): Promise<WhoisResponse> {
|
|
20
20
|
const fetch = options.fetch!;
|
|
21
21
|
|
|
@@ -67,7 +67,7 @@ export async function whois(
|
|
|
67
67
|
|
|
68
68
|
let thickResponse: any = null;
|
|
69
69
|
|
|
70
|
-
if (thickRdap) {
|
|
70
|
+
if (!options.thinOnly && thickRdap) {
|
|
71
71
|
// console.log(`fetching thick RDAP: ${thickRdap}`);
|
|
72
72
|
thickResponse = await fetch(thickRdap)
|
|
73
73
|
.then((r) => r.json() as any)
|