mirror of
https://github.com/woutdp/live_svelte
synced 2026-05-24 01:18:53 +00:00
13 lines
285 B
JavaScript
13 lines
285 B
JavaScript
import {writable} from "svelte/store"
|
|
|
|
function createStore() {
|
|
return writable(true)
|
|
}
|
|
|
|
function getStore() {
|
|
if (typeof window === "undefined") return createStore()
|
|
window.store = window.store || createStore()
|
|
return window.store
|
|
}
|
|
|
|
export default store = getStore()
|