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

Evaluation results

100%

Domain Suffix Analyzer

Trie-based suffix lookup with wildcard and exception rules

Criteria
Without context
With context

Uses tldts library

100%

100%

Uses parse function

100%

100%

Extracts publicSuffix field

100%

100%

Extracts domain field

100%

100%

Extracts subdomain field

100%

100%

Handles multi-level TLDs

100%

100%

Wildcard rule support

100%

100%

100%

URL Classification Tool

Public suffix (TLD) extraction

Criteria
Without context
With context

Public suffix extraction

100%

100%

ICANN domain identification

100%

100%

Private domain handling

100%

100%

IP address detection

100%

100%

TLD grouping logic

100%

100%

Invalid URL handling

100%

100%

100%

URL Classifier Service

URL and hostname parsing

Criteria
Without context
With context

Import tldts

100%

100%

Use parse function

100%

100%

Extract domain field

100%

100%

Extract subdomain field

100%

100%

Extract publicSuffix field

100%

100%

Extract hostname field

100%

100%

Handle isIp detection

100%

100%

30%

-27%

International Domain Validator

Unicode/IDNA domain support

Criteria
Without context
With context

Uses tldts parse function

100%

60%

Handles Unicode domains

20%

50%

Handles Punycode domains

20%

53%

Extracts email domains

100%

0%

Extracts subdomain correctly

40%

0%

Extracts publicSuffix correctly

40%

0%

Uses domain property

60%

0%

2%

-98%

Email Domain Validator

Email domain parsing

Criteria
Without context
With context

Domain extraction

100%

0%

Public suffix extraction

100%

0%

Subdomain extraction

100%

0%

Domain without suffix

100%

0%

IP detection

100%

20%

Unicode/IDNA handling

100%

0%

96%

-1%

URL Edge Case Normalizer

Complex edge case handling (leading/trailing dots, unknown TLDs, single-label hostnames)

Criteria
Without context
With context

Import tldts functions

100%

100%

Parse input URLs

100%

100%

Extract hostname correctly

80%

80%

Extract domain correctly

100%

100%

Extract public suffix

100%

100%

Detect normalization requirement

100%

93%

Detect known TLDs

100%

100%

100%

50%

URL Subdomain Analyzer

Subdomain extraction

Criteria
Without context
With context

Uses getSubdomain function

0%

100%

Imports tldts correctly

100%

100%

Handles null returns

25%

100%

Single URL analysis

66%

100%

Batch URL analysis

100%

100%

Handles empty subdomains

100%

100%

100%

51%

Local Development Domain Parser

Custom hostname support (validHosts option)

Criteria
Without context
With context

Uses tldts library

100%

100%

Applies validHosts option

0%

100%

Extracts hostname correctly

100%

100%

Extracts domain correctly

60%

100%

Extracts subdomain correctly

60%

100%

95%

45%

URL Hostname Normalizer

Hostname extraction from URLs

Criteria
Without context
With context

getHostname usage

0%

100%

IP detection

25%

100%

Batch processing

100%

100%

Hostname validation

100%

100%

Grouping implementation

100%

100%

Options usage

0%

0%

100%

15%

Cloud Domain Analyzer

ICANN vs Private domain distinction

Criteria
Without context
With context

parse() usage

100%

100%

allowPrivateDomains option

100%

100%

isIcann flag check

0%

100%

isPrivate flag check

100%

100%

domain field extraction

100%

100%

publicSuffix extraction

100%

100%

subdomain extraction

100%

100%

Install with Tessl CLI

npx tessl i tessl/npm-tldts
Evaluated
Agent
Codex

Table of Contents