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
Hi. Yes this is the default behavior as we try to keep native JSON types. I think we might support an option to opt-out from this feature but in the meantime you can use setItem(key, '"123")
Inconsistent behavior of String() and JSON.stringify() will lead to confusion, which makes it impossible to migrate directly from idb-keyval to unstorage
I use jsonr to store the compressed json into storage. Because the value obtained by getItem is not the value originally stored, an error is reported.
Environment
nodejs
v1.8.0
Reproduction
Describe the bug
Storage convert string into number for no reason
EDIT:After investigation, it's probably due to destr
https://github.com/unjs/unstorage/blob/main/src/storage.ts#L173C9-L173C21
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: