asSlug is buggy. It currently strips everything that isn't a dash or alphanumeric.
Some early thoughts on this are here: Fixing Wiki Slugs with Punycode
NPM node-stringprep package which also does Punycode—this is a wrapper for libidn that advertises JS fallbacks that aren't implemented yet.
Nameprep for domain names and canonical names will probably apply. Nameprep test cases
i18n for UI: i18next, popular, old, full-featured ; y18n, simpler