npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

idna-uts46-hx

v6.0.6

Published

Convert Domain Names correctly from IDN to Punycode and vice-versa and offer TR46 processing.

Downloads

1,019,136

Readme

IDNA-UTS #46 in JavaScript

npm version node semantic-release License: MIT PRs welcome

This module is a IDNA UTS46 connector library for javascript. In addition to the default functionality of tr46, we offer converting domain names to unicode / punycode considering the respective registry provider's behavior.

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.

Resources

v6 Notes & Migration Guide

With v6 we migrated our library to npm package tr46 as software dependency. By that step we use a library that is actively maintained in direction of correctly supporting the TR46 standard and supporting the latest Version of the Unicode Standard. Reinventing the wheel isn't useful and something we have time or resources for. We were able to dramatically decrease the number of lines of code on our end.

Improvements

  • method toUnicode comes with auto-detection of transitionalProcessing setting based on the provided domain name input
  • method toAscii comes with auto-detection of transitionalProcessing setting based on the provided domain name input

Breaking Changes

In general, we don't see a blocker for upgrading to v6. Still, consider the below changes.

Performance

Runtime performance of v6 compared to v5 has slightly improved. The compression for the underlying idna mapping table is superfluous, tr46 covers it well.

New Labels for Options

The below configuration options for the methods toUnicodeand toAscii must be renamed in case you're using them:

| Option, old | Option, new | | --------------- | ---------------------- | | transitional | transitionalProcessing | | useStd3ASCII | useSTD3ASCIIRules | | verifyDnsLength | verifyDNSLength |

Behavior

Earlier versions kept option transitional by default to false which is now automatically detected and results may therefore differ. This affects the toAscii method.

The toUnicode function did not allow for a options parameter in earlier versions, now it follows the exemplary way of package tr46.

Authors

Thanks for the below former contributions:

  • Initial work done by jcranmer.
  • v5: Migration of the IDNA Mapping Table's Build Process from Python to NodeJS5 by dawsbot
  • v5: Performance Improvements for the Browser Bundle's Page Load by dawsbot

See also the list of contributors who participated in this project.

License

MIT