Module

std/node/punycode.ts>toASCII

Deno standard library
Go to Latest
function toASCII
import { toASCII } from "https://dotland.deno.dev/std@0.177.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.

import toASCII
import { toASCII } from "https://dotland.deno.dev/std@0.177.0/node/punycode.ts";