unstorage icon indicating copy to clipboard operation
unstorage copied to clipboard

fix!: preserve type of string values when storing

Open molvqingtai opened this issue 1 year ago • 1 comments

Before the fix:

await setItem('foo', '[]')
await getItem('foo') // []

After the fix:

await setItem('foo', '[]')
await getItem('foo') // '[]'

This will fix: https://github.com/unjs/unstorage/issues/277

molvqingtai avatar Nov 05 '24 06:11 molvqingtai

Thanks for PR. As noticed it makes lots of tests fail since it is a breaking behavior change.

I will consider it for unstorage v2 👍🏼

pi0 avatar Dec 10 '24 14:12 pi0