@mitrajit/simple-whois 0.0.1
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.d.ts +4 -0
- package/dist/index.js +20 -0
- package/dist/parser.d.ts +13 -0
- package/dist/parser.js +663 -0
- package/dist/servers.json +783 -0
- package/dist/types.d.ts +42 -0
- package/dist/types.js +2 -0
- package/dist/utils.d.ts +11 -0
- package/dist/utils.js +56 -0
- package/dist/whois.d.ts +784 -0
- package/dist/whois.js +236 -0
- package/package.json +40 -0
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const parser_1 = require("./parser");
|
|
7
|
+
const whois_1 = __importDefault(require("./whois"));
|
|
8
|
+
const util_1 = __importDefault(require("util"));
|
|
9
|
+
const lookup = util_1.default.promisify(whois_1.default.lookup);
|
|
10
|
+
async function main(domain, options) {
|
|
11
|
+
const rawData = await lookup(domain, {
|
|
12
|
+
server: null,
|
|
13
|
+
follow: 0,
|
|
14
|
+
proxy: options.proxy,
|
|
15
|
+
verbose: false,
|
|
16
|
+
bind: null,
|
|
17
|
+
});
|
|
18
|
+
return (0, parser_1.parseDomainWhois)(domain, rawData);
|
|
19
|
+
}
|
|
20
|
+
exports.default = main;
|
package/dist/parser.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { WhoisData, WhoisDataGroup } from "./types";
|
|
2
|
+
export interface ParsedDomainData {
|
|
3
|
+
"Domain Status": string[];
|
|
4
|
+
"Name Server": string[];
|
|
5
|
+
text: string[];
|
|
6
|
+
[key: string]: string | string[];
|
|
7
|
+
}
|
|
8
|
+
export declare function parseSimpleWhois(whois: string): WhoisData;
|
|
9
|
+
export declare function parseDomainWhois(domain: string, whois: string, ignorePrivacy?: boolean): ParsedDomainData;
|
|
10
|
+
export declare function whoisDataToGroups(whois: string): {
|
|
11
|
+
comments: string[];
|
|
12
|
+
groups: WhoisDataGroup[];
|
|
13
|
+
};
|