svelte-observable-store
v1.0.1
Published
A writable store that includes a get() method to retrieve the current value.
Downloads
214
Readme
Svelte Observable Store
A writable store that includes a get() method to retrieve the current value.
import { syncable } from 'svelte-observable-store'
const count = syncable(0)
console.log(count.get()) // 0
count.set(5)
console.log(count.get()) // 5This utility can be preferred over Svelte's built-in get(store) function, as it avoids importing an extra function and helps maintain cleaner code.
