brianloveswords / base64url

For encoding and decoding base64url!
MIT License
224 stars 44 forks source link

add support for browser #58

Open cre8 opened 9 months ago

cre8 commented 9 months ago

The base64Url file was updated so it is using the TextEncoder and TextDecoder when dealing with encoded urls or to generate them.

For string encoding this approach is fine. But since this approach only supports utf-8 encoding there could be some limitations for some use cases. The implementation of window.atob and window.btoa are no alternative since they also only support encoding for strings.