Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { toASCII } from 'punycode'
import { toASCII } from 'punycode/'

export function splitStringBy(string: string, by: number): [string, string] {
return [string.slice(0, by), string.slice(by + 1)]
}

/**
* Check if a string is a valid TLD, and return it in canonical form.
*
* @param tld
*
* @param tld
* @returns The normalized TLD
* @throws If the TLD is invalid
*/
Expand Down
6 changes: 3 additions & 3 deletions src/whoiser.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import net from 'node:net'
import punycode from 'punycode'
import punycode from 'punycode/'

import type { DomainWhoisOptions, TldWhoisResponse, WhoisData } from './types.ts'
import { parseSimpleWhois, parseDomainWhois, whoisDataToGroups } from './parsers.ts'
Expand Down Expand Up @@ -86,7 +86,7 @@ export function whoisQuery(host: string, query: string, timeout: number = 5000):

/**
* TLD WHOIS data, from the [IANA WHOIS](https://www.iana.org/whois) server.
*
*
* @param tld TLD/SLD to query. Example: 'com', '.co.uk'
* @param timeout Timeout for WHOIS query in milliseconds
* @returns Normalized WHOIS data
Expand Down Expand Up @@ -257,7 +257,7 @@ async function findWhoisServerInIana(query: string) {

/**
* IP WHOIS data, from the [IANA WHOIS](https://www.iana.org/whois) server.
*
*
* @param ip IP address to query. Example: '192.0.2.1'
* @param options Options for WHOIS query
* @returns Normalized WHOIS data
Expand Down
Loading