Library to work against complex domain names, subdomains and URIs
82
{
"context": "This criteria evaluates how effectively the engineer uses the tldts package to distinguish between ICANN and private domains, particularly focusing on the allowPrivateDomains option and the isIcann/isPrivate flags for proper domain classification on cloud platforms.",
"type": "weighted_checklist",
"checklist": [
{
"name": "parse() usage",
"description": "Uses the parse() function from tldts to extract domain information from URLs",
"max_score": 15
},
{
"name": "allowPrivateDomains option",
"description": "Correctly uses the allowPrivateDomains option set to true to enable private domain suffix recognition",
"max_score": 25
},
{
"name": "isIcann flag check",
"description": "Uses the isIcann flag from parse results to identify ICANN domains",
"max_score": 15
},
{
"name": "isPrivate flag check",
"description": "Uses the isPrivate flag from parse results to identify private/cloud platform domains",
"max_score": 15
},
{
"name": "domain field extraction",
"description": "Extracts the domain field from parse results, which correctly includes private suffixes when allowPrivateDomains is enabled",
"max_score": 10
},
{
"name": "publicSuffix extraction",
"description": "Extracts the publicSuffix field from parse results to identify the TLD or private suffix",
"max_score": 10
},
{
"name": "subdomain extraction",
"description": "Extracts the subdomain field from parse results to capture subdomain information",
"max_score": 10
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-tldtsdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10