This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { writable } from 'svelte/store'; | |
import { onMount } from "svelte"; | |
export default function paramStore(initial: any, key: string) { | |
const pageParamStore = writable(initial); | |
const {subscribe, set, update} = pageParamStore | |
onMount(() => { | |
pageParamStore.subscribe((input) => { | |
const url = new URL(window.location.toString()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let timer; | |
let timeout; | |
let interval; | |
// Could expand the delay to include time unit strings like '1m' or '2s' instead of just milliseconds | |
// interface delayedInputProps { | |
// callback: () => void; | |
// delay: number; | |
// steps?: number; | |
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" | |
" | |
" ,---,. | |
" ,' .' \ ,--, | |
",---.' .' | ,---. ,--.'| ,---, | |
"| | |: | ' ,'\ ,----._,. ,----._,. | |, ,-+-. / | | |
": : : / / / | / / ' / / / ' / `--'_ ,--.'|' | | |
": | ; . ; ,. : | : | | : | ,' ,'| | | ,"' | | |
"| : \ ' | |: : | | .\ . | | .\ . ' | | | | / | | | |
"| | . | ' | .; : . ; '; | . ; '; | | | : | | | | | |