docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
A module that converts a single Unicode host label into an ASCII Punycode label for DNS-safe usage while leaving already-ASCII labels unchanged.
/**
* 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.