fix(core): update
This commit is contained in:
parent
4093d091f4
commit
b686202ae5
@ -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 () => {
|
tap.test('should get a parsed url result for whois', async () => {
|
||||||
const parsedUrlResult = await testSmartWhois.getParsedUrlResultForWhois('https://coffee.link/understanding-gen-z/');
|
const parsedUrlResult = await testSmartWhois.getParsedUrlResultForWhois('https://coffee.link/understanding-gen-z/');
|
||||||
console.log(parsedUrlResult);
|
console.log(parsedUrlResult);
|
||||||
|
const parsedUrlResult2 = await testSmartWhois.getParsedUrlResultForWhois('task.vc');
|
||||||
|
console.log(parsedUrlResult2);
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.test('should get additional data', async () => {
|
tap.test('should get additional data', async () => {
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@pushrocks/smartwhois',
|
name: '@pushrocks/smartwhois',
|
||||||
version: '1.0.11',
|
version: '1.0.12',
|
||||||
description: 'a package for dealing with whois requests'
|
description: 'a package for dealing with whois requests'
|
||||||
}
|
}
|
||||||
|
@ -42,6 +42,9 @@ export class SmartWhois {
|
|||||||
* can be used to prepare an input for the whois command
|
* can be used to prepare an input for the whois command
|
||||||
*/
|
*/
|
||||||
public async getParsedUrlResultForWhois(urlArg: string) {
|
public async getParsedUrlResultForWhois(urlArg: string) {
|
||||||
|
if (!urlArg.includes('//')) {
|
||||||
|
urlArg = `https://${urlArg}`;
|
||||||
|
}
|
||||||
const smarturlInstance = plugins.smarturl.Smarturl.createFromUrl(urlArg);
|
const smarturlInstance = plugins.smarturl.Smarturl.createFromUrl(urlArg);
|
||||||
const tldtsData = plugins.tldts.parse(urlArg);
|
const tldtsData = plugins.tldts.parse(urlArg);
|
||||||
return {
|
return {
|
||||||
|
Loading…
Reference in New Issue
Block a user