You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@michaelficarra is adding functions for working with strings of Unicode code points. Normalization is an important part of supporting Unicode strings, as illustrated by a Spotify blogpost, Creative Usernames.
IDK if we can add this function to this lib, though, as it looks like only MS Edge browser has str.normalize - MS docs: normalize. But most other browsers should have it - MDN: normalize
The text was updated successfully, but these errors were encountered:
Looks like that one is a binding to a Node lib [1], which is polyfill.
According to MDN [2], most browsers support normalize, so we shouldn't need a polyfill. I wonder if ES 2015 is an important consideration, though.
I'm keen on adding this, especially given that all modern browsers support it. The only potential issue is what we do on platforms which don't support it. I think we have two options:
Just return the same string, and call console.error explaining that normalize wasn't available and that this might break things,
Throw an error immediately.
I'm not sure which of these I prefer, but I'm leaning towards the latter.
@michaelficarra is adding functions for working with strings of Unicode code points. Normalization is an important part of supporting Unicode strings, as illustrated by a Spotify blogpost, Creative Usernames.
Looks like https://github.com/menelaos/purescript-stringutils/blob/v0.0.6/src/Data/String/Utils.purs#L221 has this function, but we can also add it here, as some functions in that repo presumes ES6 support, which isn't acceptable by all PS users.
IDK if we can add this function to this lib, though, as it looks like only MS Edge browser has str.normalize - MS docs: normalize. But most other browsers should have it - MDN: normalize
The text was updated successfully, but these errors were encountered: