Skip to main content
Module

std/node/punycode.ts>toASCII

Deno standard library
Go to Latest
function toASCII
Re-export
import { toASCII } from "https://deno.land/std@0.166.0/node/punycode.ts";

Converts a Unicode string representing a domain name or an email address to Punycode. Only the non-ASCII parts of the domain name will be converted, i.e. it doesn't matter if you call it with a domain that's already in ASCII.

Parameters

input: string

The domain name or email address to convert, as a Unicode string.

Returns

string

The Punycode representation of the given domain name or email address.