mirror of
https://github.com/BradNut/boredgame
synced 2025-09-08 17:40:22 +00:00
15 lines
278 B
TypeScript
15 lines
278 B
TypeScript
import { writable } from 'svelte/store';
|
|
|
|
// Custom store
|
|
const state = () => {
|
|
const initial = 1;
|
|
const { subscribe, set, update } = writable(initial);
|
|
|
|
function clear() {
|
|
set(initial);
|
|
}
|
|
|
|
return { subscribe, set, update, clear };
|
|
};
|
|
|
|
export const pagination = state();
|