kungfooman / RuntimeTypeInspector.js

Checking JSDoc types at runtime for high-quality types - Trust is good, control is better.
MIT License
8 stars 0 forks source link

Set Hash via `btoa` fails on emojis #188

Open kungfooman opened 1 month ago

kungfooman commented 1 month ago

Simple example:

btoa('🤗');

Error:

Uncaught DOMException: Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.

So I need a better way to create a hashed state URL. Any ideas?