The main
import * as tlds from "./tlds.json";export function getTldInfo(tldType: "HNS" | "ICANN"): string[] { return tlds[tldType] || [];}
key | value |
---|---|
getTldInfo | This function returns an array of TLDs of the specified type. |
HNS | Handshake TLDs |
ICANN | ICANN TLDs |
tlds | This is the list of TLDs. |
tldType | This is the type of TLDs to return. |
In this module, you can find the getTldInfo
function, which returns an array of TLDs based on the specified type. The type can either be "HNS" for Handshake TLDs or "ICANN" for ICANN TLDs. The function uses a tlds
object that holds the TLDs for both types and returns the corresponding array based on the input type.