blob: dd85588dd52cd2248a504f7b967729598f227a4e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
import { browser } from '$app/environment';
import { writable } from 'svelte/store';
import localforage from 'localforage';
const anime = writable<string>('');
if (browser) {
localforage.getItem<string>('anime').then((value) => {
if (value) anime.set(value);
});
anime.subscribe((value) => {
localforage.setItem('anime', value);
});
}
export default anime;
|