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

{
  "context": "This criteria evaluates how well the engineer uses the tldts library's validHosts option to parse custom development hostnames. The focus is on correct usage of the library's API for handling non-standard domain names in local development environments.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses tldts library",
      "description": "Solution imports and uses functions from the tldts library (parse, getDomain, getSubdomain, or getHostname)",
      "max_score": 15
    },
    {
      "name": "Applies validHosts option",
      "description": "Passes the validHosts option to tldts functions with the custom hostnames array containing ['localhost', 'internal', 'mycompany.local']",
      "max_score": 35
    },
    {
      "name": "Extracts hostname correctly",
      "description": "Correctly extracts and returns the full hostname from the parsing result",
      "max_score": 10
    },
    {
      "name": "Extracts domain correctly",
      "description": "Correctly extracts and returns the domain portion using tldts functions with validHosts option",
      "max_score": 20
    },
    {
      "name": "Extracts subdomain correctly",
      "description": "Correctly extracts and returns the subdomain portion using tldts functions with validHosts option",
      "max_score": 20
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-tldts

tile.json