1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-01 16:51:13 -05:00
denoland-deno/cli/js/ops/idna.ts

12 lines
344 B
TypeScript

// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
/** https://url.spec.whatwg.org/#idna */
import { sendSync } from "./dispatch_json.ts";
export function domainToAscii(
domain: string,
{ beStrict = false }: { beStrict?: boolean } = {}
): string {
return sendSync("op_domain_to_ascii", { domain, beStrict });
}