open-index/open-npm huggingface dataset:
npm package: @stroblp/svelte-persistent-writable
Description: A persistent store for svelte, based on svelte custom store with localforage (indexeddb,websql,localstorage)
Latest version: 1.3.1

# what is this

A persistent store for svelte, based on svelte custom store with localforage (indexeddb,websql,localstorage)

# example

https://stroblp.github.io/svelte-persistent-store/

Svelte writable data is written into the choosen persisten store. In the example, counter value is restored after page reload.

# install

`npm i @stroblp/svelte-persistent-writable`

Usage..

```
<script>
	import persistentStore from "svelte-writable-persistent-store"
	let countIndexedDB = presistentStore(storeKey:"counter-value",initVal:0,            {
        driver : "INDEXEDDB",
        storeName : "default-store",
        dbName : "svelte-presistent-db" });
</script>

<button on:click={() => ($countIndexedDB -= 1)}>-</button>
<span>{$countIndexedDB}</span>
<button on:click={() => ($countIndexedDB += 1)}>+</button>
<button on:click={() => ($countIndexedDB =0)}>Clear</button>
```
## parameters

* storeKey - key value for the persistent db

* initVal - intial value to be stored in persistent db

## options

* driver - INDEXEDDB (default) | WEBSQL | LOCALSTORAGE

* storeName - store name: default value is set to "default-store"

* dbName - DB name: default value is set to "svelte-presistent-db"


        
if driver initialization process has failed store will return undefined
npm package: @stroblp/svelte-treeview
Description: A Svelte collapsable treeview with custom components added to nodes. Tree state is persistant trough the usage of indexeddb/localstorage
Latest version: 1.0.3

# what is this

A Svelte collapsable treeview with custom components added to nodes. Tree state is persistant trough the usage of indexeddb/localstorage 

# example

https://stroblp.github.io/svelte-treeview/

https://stroblp.github.io/gh-pages-demo-app/#/building-floors/


# install

`npm i @stroblp/svelte-treeview`

Usage..

TreeItem.svelte,NodeItem.svelte,TreeRoot.svelte can be any valid svelte component

```
<script>
	import Tree from "svelte-treeview";
    import Item from "./TreeItem.svelte"
    import Node from "./TreeNode.svelte"
    import Root from "./TreeRoot.svelte"
    const tree =
    {
        props: { id: "root-node", label: "root" }, children: [
            {
                props: { id: "node1", label: "node1" }, children: [
                    { props: { id: "item1-1", label: "item1.1" } },
                    { props: { id: "item1-2", label: "item1.2"} },
                    {
                        props: { id: "node11", label: "node1" }, children: [
                            { props: { id: "item11-1", label: "item11.1"} },
                            { props: { id: "item11-2", label: "item11.2" } },
                        ]
                    },
                ]
            },
            {
                props: { id: "node2", label: "node2" }, children: [
                    { props: { id: "item2-1", label: "item2.1"} },
                    { props: { id: "item2-2", label: "item2.2" } },
                ]
            }
        ]
    }    
</script>



<Tree node={tree} treeName="test-tree" />
```