1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-25 08:39:09 -05:00
denoland-deno/cli/js/ops/idna.ts
2020-07-14 15:24:17 -04:00

12 lines
345 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 });
}