-
-
Notifications
You must be signed in to change notification settings - Fork 533
Remove nanoid #1712
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
Comments
I’m not particular about the library used; it’s swappable. Actually looking at benchmarks I would like to use something faster, but without incurring the full weight of uuid. I may even end up handrolling something because it doesn’t need to be secure, or that unique (it can collide much more often because it’s only meant to compare requests right next to each other, not months apart) |
can we use simple |
That’s not a bad suggestion! Though this is something I do want to split hairs on to at least match nanoid’s performance and ideally beat if possible. For many libraries that’s overkill, but a design decision of this library is to be at the center of every fetch request it should be functionally equivalent to native |
we should also need to skip generating the id when no middleware is registered |
Fixed in |
Thanks |
Description
A brief description of the bug. Provide either a screenshot or the full error message
Hi, thanks for this awesome lib, the new version added
nanoid
for middleware usage, I'm using this package in my rn project andcrypto
isn't available there. Not only rn but there's other platforms/runtimes too where crypto available so adding that to dep and using it even when we arent using middleware makes it impossible for me to update. For now, I patched the package to removenanoid
. I can create a pr to fix it but need to discuss what should we use instead.Reproduction
How can this be reproduced / when did the error occur? Does the issue occur in a specific browser, or all browsers?
Use the package in any env where crypto isn't available
Expected result
It should work and specially when I'm not even using middleware so id is useless for me.
(in case it’s not obvious)
Checklist
The text was updated successfully, but these errors were encountered: