0.0.16 • Published 2 years ago
@crikey/stores-svelte v0.0.16
@crikey/stores-svelte
Provide svelte compatible implementations of readable, writable, derived
and get.
This package is a simple convenience wrapper around @crikey/stores-base utilising the
trigger_safe_not_equal trigger function to mirror svelte greedy signaling semantics.
See @crikey/stores-svelte for full documentation.
API
Store creation functions:
constant- Create aReadablestore with a fixed valuereadable- Create aReadablestorewritable- Create aWritablestorederive- Create aReadablestore derived from the resolved values of other storestransform- Create aWritablestore by applying transform functions when reading and writing values
Utility functions:
get- Retrieve the value of a store
Installation
# pnpm
$ pnpm add @crikey/stores-svelte
# npm
$ npm add @crikey/stores-svelte
# yarn
$ yarn add @crikey/stores-svelteUsage
Standard usage should be a drop in replacement for svelte/store.