Module

std/node/punycode.ts

Deno standard library
Go to Latest
function toASCII
import { toASCII } from "https://deno.land/std@0.145.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://deno.land/std@0.145.0/node/punycode.ts";