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-4/

{
  "context": "This criteria evaluates how well the engineer uses the tldts package to handle internationalized domain names (IDN), including Unicode domains, Punycode equivalents, and international email addresses. The focus is entirely on proper usage of tldts functions for parsing and extracting information from domains with Unicode characters.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses tldts parse function",
      "description": "Uses the `parse()` function from tldts to extract domain information from input strings",
      "max_score": 20
    },
    {
      "name": "Handles Unicode domains",
      "description": "Correctly processes Unicode domain names (e.g., '中国.公司.cn') and extracts domain, subdomain, and publicSuffix using tldts",
      "max_score": 20
    },
    {
      "name": "Handles Punycode domains",
      "description": "Correctly processes Punycode-encoded domain names (e.g., 'xn--fiqs8s.xn--55qx5d.cn') and extracts the same information as Unicode equivalents",
      "max_score": 15
    },
    {
      "name": "Extracts email domains",
      "description": "Uses tldts to extract domain information from international email addresses (e.g., 'user@münchen.de', '田中@例え.jp')",
      "max_score": 20
    },
    {
      "name": "Extracts subdomain correctly",
      "description": "Uses the `subdomain` property from tldts parse result to identify subdomains in mixed Unicode/ASCII domains",
      "max_score": 10
    },
    {
      "name": "Extracts publicSuffix correctly",
      "description": "Uses the `publicSuffix` property from tldts parse result to identify the TLD portion of international domains",
      "max_score": 10
    },
    {
      "name": "Uses domain property",
      "description": "Uses the `domain` property from tldts parse result to extract the registrable domain",
      "max_score": 5
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-tldts

tile.json