CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-tldts

Library to work against complex domain names, subdomains and URIs

82

1.03x
Overview
Eval results
Files

rubric.jsonevals/scenario-10/

{
  "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-tldts

tile.json