A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.
93
Quality
Pending
Does it follow best practices?
Impact
93%
1.17xAverage score across 10 eval scenarios
A module that converts a single Unicode host label into an ASCII Punycode label for DNS-safe usage while leaving already-ASCII labels unchanged.
@generates
/**
* Transforms a single domain label into its ASCII representation.
* @param {string} label - Unicode label without separators.
* @returns {string} ASCII label encoded with Punycode when needed.
* @throws {RangeError} Propagates if the dependency rejects the input.
*/
export function encodeLabel(label);Provides conversion utilities between Unicode labels and Punycode ASCII for IDNA-safe host components.
Install with Tessl CLI
npx tessl i tessl/npm-punycodedocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10