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
Yeah also it came to my attention that all these Unicode characters aren’t even allowed in handles cause they’re ascii 😅
So you can probs do something way simpler. Just wanna take into account letter substitutions like l/1 for i, etc
i generally prefer to run a pass over a string to fold characters into what they could look like as letters. like f00 -> foo and then your regex only has to match /foo/ rather than /f[o0][o0]/
It might just be me being a grumpy weirdo (extremely possible) but I get tired of people asking me if they can use things which I already explicitly designated as freely usable. I do like a heads-up though ("hey I'm using [thing] for [project], ty")
obviously I can't speak for dholms though