-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support web workers #65
Comments
I get the idea. Willing to look at a PR. I don't like the idea of using anything but the most rudimentary fast hashing algorithm (like, something that could be implemented in less than 10 LOC). cuid should remain a tiny dependency. Also, I'd prefer not to use try/catch. We can check for feature availability without slowing things down with error catching. While we're at it, we could use feature detection to eliminate the separate build for Node. Game on! |
Okay, will think about a PR once I get some time perhaps (at the moment I'm using shortid) As for the try/catch: AFAIK the |
Good point. |
This should be fixed now. Reopen if you still have trouble. |
Please add support for web workers.
cuid()
currently throws an exception in web workers sincenavigator.mimeTypes
is not available in that context.Generally, for the fingerprint I suggest to collect various strings as a whole, gracefully handling errors, and then create a fingerprint out of that (arbitrary length) string using some hash function - like MD5, but perhaps something more lightweight.
Something in this direction:
I think you get the idea...
The text was updated successfully, but these errors were encountered: