svelte-runes-store is a svelte/sveltekit package to build (persistent) svelte stores using runes.
npm install svelte-runes-store
To run the examples from /src/routes
:
git clone https://github.com/joaquimnetocel/svelte-runes-store.git
cd svelte-runes-store
npm install
npm run dev
functionCreateStore
: Function to create the store.functionReadStore
: Function to read the store.functionCreateStore
:PARAMETER | DESCRIPTION | TYPE | REQUIRED | DEFAULT |
---|---|---|---|---|
value |
INITIAL VALUE OF THE STORE. | Generic |
YES | - |
name |
STORE NAME. | string |
YES | - |
persistent |
PERSISTENT STORE (OR NOT). | boolean |
NO | false |
storage |
STORAGE TYPE. | localStorage OR sessionStorage |
NO | localStorage |
functionReadStore
:PARAMETER | DESCRIPTION | TYPE | REQUIRED | DEFAULT |
---|---|---|---|---|
name |
STORE NAME. | string |
YES | - |