unjs / unstorage

💾 Unstorage provides an async Key-Value storage API with conventional features like multi driver mounting, watching and working with metadata, dozens of built-in drivers and a tiny core.
https://unstorage.unjs.io
MIT License
1.71k stars 128 forks source link

replace Session Storage and Local Storage drivers with Web Storage driver #203

Open thecotne opened 1 year ago

thecotne commented 1 year ago

Describe the feature

session and locale storage is really same kind of storage so it does not make sense to have two separate drivers for them

see

it's also one interface in typescript for both objects

Additional information

pi0 commented 1 year ago

You are right. PR welcome to introduce a single new driver. We can reexport it as local/session storage for ease of use and bw compatibility.