import { convert, toAscii, toUnicode } from '@dawsbot/idna-uts46';
On the web
This module is a IDNA UTS46 connector library for javascript. This is a maintained fork of the idna-uts46 library originally written by jcranmer then forked by dawsbot.
The JS Punycode converter library is a great tool for handling Unicode domain names, but it only implements the Punycode encoding of domain labels, not the full IDNA algorithm. In simple cases, a mere conversion to lowercase text before input would seem sufficient, but the real mapping for strings is far more complex. This library implements the full mapping for these strings, as defined by UTS #46.
MIT