mazipan / nuxt-storage

🛢 Utilities for easy read and write browser's storage in Nuxt.js project
MIT License
126 stars 8 forks source link

how to set default expiry time? #235

Open xfxpositions opened 1 year ago

xfxpositions commented 1 year ago

i wanna set expiry time for all stores.

jofftiquez commented 1 year ago

+1 for this, so it won't be needed to add it everytime

mahmoudIsProgramer commented 12 months ago

+1 for this

daviprm commented 10 months ago

+1

daviprm commented 10 months ago

so... i solved this in pinia using this: this.cart = JSON.parse(localStorage.getItem('cart')) || [];

nuxt storage was not updated to nuxt3, so i had to use the default localstorage :D