How to use the tr46.toUnicode function in tr46

To help you get started, we’ve selected a few tr46 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github abhaydoke09 / Deep-Learning-For-Surveillance / FrontEnd / node_modules / whatwg-url / lib / url-state-machine.js View on Github external
function serializeOrigin(tuple) {
  if (tuple.scheme === undefined || tuple.host === undefined || tuple.port === undefined) {
    return "null";
  }

  let result = tuple.scheme + "://";
  result += tr46.toUnicode(tuple.host, false).domain;

  if (tuple.port !== null) {
    result += ":" + tuple.port;
  }

  return result;
}
github ddwhan0123 / ReactNativeDemo / RouteDemo / node_modules / whatwg-url / lib / url-state-machine.js View on Github external
function serializeOrigin(tuple) {
  if (tuple.scheme === undefined || tuple.host === undefined || tuple.port === undefined) {
    return "null";
  }

  let result = tuple.scheme + "://";
  result += tr46.toUnicode(tuple.host, false).domain;

  if (tuple.port !== null) {
    result += ":" + tuple.port;
  }

  return result;
}

tr46

An implementation of the Unicode UTS #46: Unicode IDNA Compatibility Processing

MIT
Latest version published 1 year ago

Package Health Score

68 / 100
Full package analysis