Yup yup totally 👍
The actually regexes come from another repo credited in a comment (they asked for credit) so copy over the comment to :)
1 19Samuel
@samuel.fm
srsly tho interesting stuff, I wonder if I should be running a library like this on my usernames? I could imagine that there's an avenue for error if someone uses a weird character but then when you try and access the subdomain it gets changed
https://www.npmjs.com/package/idna-uts46
npm: idna-uts46
A UTS #46 processing algorithm for IDNA2008 strings. Latest version: 1.1.0, last published: 6 years ago. Start using idna-uts46 in your project by running `npm i idna-uts46`. There are 8 other project...
npmjs.com