or run

npx @tessl/cli init
Log in

Version

Files

docs

index.md
tile.json

task.mdevals/scenario-4/

ASCII Domain Converter

Create a utility that turns domain names or email addresses into ASCII-safe form while leaving already-ASCII content unchanged. When an @ is present, only convert the domain portion; the local part must be preserved verbatim. Repeated calls on already-converted input should not alter the result further.

Capabilities

Convert Unicode domains

  • "mañana.com" becomes "xn--maana-pta.com" @test
  • "δοκιμή。com" normalizes legacy separators and converts to "xn--jxalpdlp.com" @test

Convert email domains

  • "info@bücher.example" becomes "info@xn--bcher-kva.example" while keeping the local part intact @test

Preserve ASCII inputs

Implementation

@generates

API

export function toAsciiAddress(input);

Dependencies { .dependencies }

punycode { .dependency }

Provides conversion utilities for domain and email data.