unstorage
unstorage copied to clipboard
replace Session Storage and Local Storage drivers with Web Storage driver
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
- https://developer.mozilla.org/en-US/docs/Web/API/Storage
- https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API
it's also one interface in typescript for both objects
- https://github.com/microsoft/TypeScript/blob/main/src/lib/dom.generated.d.ts#L21520
- https://github.com/microsoft/TypeScript/blob/main/src/lib/dom.generated.d.ts#L25709
- https://github.com/microsoft/TypeScript/blob/main/src/lib/dom.generated.d.ts#L25758
Additional information
- [X] Would you be willing to help implement this feature?
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.