File size: 499 Bytes
d6fedfa
cd353d4
 
 
 
 
 
 
 
 
 
 
 
d6fedfa
be97094
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

import { derived, writable, get, type Writable, type Readable } from 'svelte/store';

export const pipelineValues: Writable<Record<string, any>> = writable({});
export const deboucedPipelineValues: Readable<Record<string, any>>
    = derived(pipelineValues, ($pipelineValues, set) => {
        const debounced = setTimeout(() => {
            set($pipelineValues);
        }, 100);
        return () => clearTimeout(debounced);
    });



export const getPipelineValues = () => get(pipelineValues);