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
This might be an addon proposal as this proposal has already reached implementations.
When it comes to comparision and sorting, base64 does not preserve the sort order from the original array. This is possible to achieve by using another alphabet that preserves the lexical order of the orignal array as long as arrays are of the same lengths.
Could it be an option to provide a custom alphabet else than base64 and base64url? If the alphabet option would be something like {custom: string} it might allow for using a custom alphabet?
It would have to be a followup proposal, but yes, it could be done - the two values for the alphabet option are much shorter than any valid alphabet, so a straightforward extension would be to also allow a length-64 string to use as the alphabet. There would need to be a strong motivation, however, and I don't think the sorting use case comes up often enough to be a motivation on its own.
This might be an addon proposal as this proposal has already reached implementations.
When it comes to comparision and sorting, base64 does not preserve the sort order from the original array. This is possible to achieve by using another alphabet that preserves the lexical order of the orignal array as long as arrays are of the same lengths.
Could it be an option to provide a custom alphabet else than base64 and base64url? If the alphabet option would be something like
{custom: string}
it might allow for using a custom alphabet?Implementations examples and related articles:
The text was updated successfully, but these errors were encountered: