or run

npx @tessl/cli init
Log in

Version

Files

docs

index.md
tile.json

task.mdevals/scenario-2/

Case-insensitive Punycode Label Decoder

Create a utility that turns domain or email strings containing Punycode labels into their Unicode form. The decoding must treat punycoded labels case-insensitively while leaving already-Unicode or plain ASCII labels untouched so repeated calls stay stable.

Capabilities

Decode punycoded domain labels

  • "XN--Mller-kva.de" becomes "müller.de", decoding the Punycode label even when the prefix casing is mixed. @test

Preserve existing ASCII or Unicode labels

  • "shop.Example.COM" stays unchanged because it contains no Punycode labels. @test

Decode email domains without altering local parts

  • "admin@XN--caf-dma.com" becomes "admin@café.com", only decoding the domain portion. @test

Implementation

@generates

API

export function decodeLabels(input: string): string;

Dependencies { .dependencies }

punycode { .dependency }

Provides conversion utilities for Punycode and Unicode domain labels.