A super-simple localStorage-persisted Svelte store
Because it uses the default Svelte stores under-the-hood, all you have to do is change your imports from:
import { writable } from "svelte/store";
export const counter = writable(0);
to:
import { persisted } from "ls-store";
export const counter = persisted("localStorageItemKey", 0);