joshnuss / svelte-persisted-store

A Svelte store that persists to localStorage

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow using sessionStorage

janosh opened this issue · comments

Could the Storage object be made configurable? Need to store something to sessionStorage instead of localStorage.

I believe the API for both are similar, so I'd be open to accepting a PR.

Though I wonder if the repo name should change then.

The API is indeed identical afaik. The only difference is sessionStorage is cleared when the page session ends.

Though I wonder if the repo name should change then.

GH automatically sets up URL forward so changing the repo name would be easy. NPM is a problem though.