CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-punycode

A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.

93

1.17x

Quality

Pending

Does it follow best practices?

Impact

93%

1.17x

Average score across 10 eval scenarios

Overview
Eval results
Files

task.mdevals/scenario-5/

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.

Install with Tessl CLI

npx tessl i tessl/npm-punycode

tile.json