4 Commits

Author SHA1 Message Date
39442208c8 1.0.12 2023-04-19 18:57:12 +02:00
b686202ae5 fix(core): update 2023-04-19 18:57:12 +02:00
4093d091f4 1.0.11 2023-04-19 18:49:06 +02:00
7a8086b58c fix(core): update 2023-04-19 18:49:06 +02:00
4 changed files with 11 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartwhois",
"version": "1.0.10",
"version": "1.0.12",
"private": false,
"description": "a package for dealing with whois requests",
"main": "dist_ts/index.js",

View File

@ -11,6 +11,8 @@ tap.test('should create a valid instance of SmartWhois', async () => {
tap.test('should get a parsed url result for whois', async () => {
const parsedUrlResult = await testSmartWhois.getParsedUrlResultForWhois('https://coffee.link/understanding-gen-z/');
console.log(parsedUrlResult);
const parsedUrlResult2 = await testSmartWhois.getParsedUrlResultForWhois('task.vc');
console.log(parsedUrlResult2);
});
tap.test('should get additional data', async () => {
@ -22,6 +24,10 @@ tap.test('should get whois info for domain', async () => {
const whoisInfo = await testSmartWhois.getWhoisForDomain('task.vc');
console.log(whoisInfo);
});
tap.test('should get whois info for domain', async () => {
const whoisInfo = await testSmartWhois.getWhoisForDomain('https://lossless.com');
console.log(whoisInfo);
});
tap.test('should get whois info for domain', async () => {
const whoisInfo = await testSmartWhois.getWhoisForDomain('https://coffee.link/understanding-gen-z/');

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@pushrocks/smartwhois',
version: '1.0.10',
version: '1.0.12',
description: 'a package for dealing with whois requests'
}

View File

@ -42,6 +42,9 @@ export class SmartWhois {
* can be used to prepare an input for the whois command
*/
public async getParsedUrlResultForWhois(urlArg: string) {
if (!urlArg.includes('//')) {
urlArg = `https://${urlArg}`;
}
const smarturlInstance = plugins.smarturl.Smarturl.createFromUrl(urlArg);
const tldtsData = plugins.tldts.parse(urlArg);
return {